Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/parser/parser.rb

Instance Method Summary collapse

Instance Method Details

#line_of(pos) ⇒ Object



279
280
281
# File 'lib/parser/parser.rb', line 279

def line_of(pos)
  self[0..pos].count "\n"
end