Class: StrLitNode
Instance Method Summary collapse
- #gen ⇒ Object
-
#initialize(val) ⇒ StrLitNode
constructor
A new instance of StrLitNode.
Methods inherited from Node
Constructor Details
#initialize(val) ⇒ StrLitNode
Returns a new instance of StrLitNode.
122 |
# File 'lib/code_generator.rb', line 122 def initialize val; super(val); end |
Instance Method Details
#gen ⇒ Object
124 125 126 127 128 129 130 131 132 |
# File 'lib/code_generator.rb', line 124 def gen #FIXME HACK if @value.respond_to? :gen val = @value.gen else val = @value end val.gsub(/^'(.*)'$/, '\1') end |