Class: TypedExprNode
Instance Method Summary collapse
- #column ⇒ Object
- #gen ⇒ Object
-
#initialize(val, *args) ⇒ TypedExprNode
constructor
A new instance of TypedExprNode.
Constructor Details
#initialize(val, *args) ⇒ TypedExprNode
Returns a new instance of TypedExprNode.
75 76 77 78 79 80 81 82 83 84 |
# File 'lib/code_generator.rb', line 75 def initialize val, *args @children = args @type = @children[0] @value = case @type.gen when 'text' then TextNode.new(val) when 'date' then DateExprNode.new(val) else raise "Unknown type: #{@children[0]}" end end |
Instance Method Details
#column ⇒ Object
86 87 88 |
# File 'lib/code_generator.rb', line 86 def column @value.column end |
#gen ⇒ Object
90 91 92 |
# File 'lib/code_generator.rb', line 90 def gen @value.gen end |