class String
Public Instance Methods
coordinates_of_index(index)
click to toggle source
# File lib/cfoo/file_system.rb, line 4 def coordinates_of_index(index) lines = split("\n") line_number = 1 column_number = index + 1 lines.each do |line| if line.length < column_number line_number += 1 column_number -= line.length else return [ line_number, column_number ] end end [ -1, -1 ] end
expand_el()
click to toggle source
# File lib/cfoo/parser.rb, line 40 def expand_el Cfoo::ElParser.parse(self) end