Class: String

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

Instance Method Summary collapse

Instance Method Details

#raw ⇒ Object



20
# File 'src/parser.rb', line 20

def raw = to_s end

#represent ⇒ Object



18
# File 'src/parser.rb', line 18

def represent = to_s end

#underscore ⇒ Object



8
9
10
11
12
13
14
# File 'src/parser.rb', line 8

def underscore
  self.gsub(/::/, '/').
    gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
    gsub(/([a-z\d])([A-Z])/,'\1_\2').
    tr("-", "_").
    downcase
end