Class: Potter::AST::Unary
Instance Attribute Summary collapse
-
#child ⇒ Object
readonly
Returns the value of attribute child.
Instance Method Summary collapse
- #eval ⇒ Object
-
#initialize(child) ⇒ Unary
constructor
A new instance of Unary.
Methods inherited from Node
#eql?, #hash, #name, #symbol, #visit
Constructor Details
#initialize(child) ⇒ Unary
Returns a new instance of Unary.
6 7 8 9 |
# File 'lib/potter/ast/unary.rb', line 6 def initialize(child) super() @child = child end |
Instance Attribute Details
#child ⇒ Object (readonly)
Returns the value of attribute child.
4 5 6 |
# File 'lib/potter/ast/unary.rb', line 4 def child @child end |
Instance Method Details
#eval ⇒ Object
11 |
# File 'lib/potter/ast/unary.rb', line 11 def eval = public_send(symbol) |