Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/rp_extensions.rb,
lib/rp_extensions.rb
Instance Attribute Summary collapse
-
#lineno ⇒ Object
This is a hack used by the lexer to sneak in line numbers at the identifier level.
Instance Method Summary collapse
Instance Attribute Details
#lineno ⇒ Object
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_caller ⇒ Object
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 |