Method: REXML::Source#current_line

Defined in:
lib/extensions/rexml/rexml/source.rb,
lib/extensions/rhoxml/rexml/source.rb

#current_lineObject

Returns the current line in the source.

Returns:

  • the current line in the source



124
125
126
127
128
129
# File 'lib/extensions/rexml/rexml/source.rb', line 124

def current_line
  lines = @orig.split
  res = lines.grep @buffer[0..30]
  res = res[-1] if res.kind_of? Array
  lines.index( res ) if res
end