Class: String

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#linenoObject

This is a hack used by the lexer to sneak in line numbers at the identifier level. This should be MUCH smaller than making process_token return [value, lineno] and modifying EVERYTHING that reduces tIDENTIFIER.



40
41
42
# File 'lib/rp_extensions.rb', line 40

def lineno
  @lineno
end

Instance Method Details

#clean_callerObject



42
43
44
# File 'lib/rp_extensions.rb', line 42

def clean_caller
  self.sub(File.dirname(__FILE__), ".").sub(/:in.*/, "")
end

#grep(re) ⇒ Object



27
28
29
# File 'lib/rp_extensions.rb', line 27

def grep re
  lines.grep re
end