ruler code