Class: Potter::AST::Unary

Inherits:
Node
  • Object
show all
Defined in:
lib/potter/ast/unary.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#childObject (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

#evalObject



11
# File 'lib/potter/ast/unary.rb', line 11

def eval = public_send(symbol)