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.


33
34
35
# File 'lib/rp_extensions.rb', line 33

def lineno
  @lineno
end

Instance Method Details

#clean_callerObject


35
36
37
# File 'lib/rp_extensions.rb', line 35

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

#grep(re) ⇒ Object


20
21
22
# File 'lib/rp_extensions.rb', line 20

def grep re
  lines.grep re
end