Class: Chelsy::Operator::Unary
- Defined in:
- lib/chelsy/ast.rb
Instance Attribute Summary collapse
-
#operand ⇒ Object
readonly
Returns the value of attribute operand.
Attributes inherited from Element
Instance Method Summary collapse
-
#initialize(operand, **rest) ⇒ Unary
constructor
A new instance of Unary.
Methods inherited from Base
Constructor Details
#initialize(operand, **rest) ⇒ Unary
Returns a new instance of Unary.
544 545 546 547 548 |
# File 'lib/chelsy/ast.rb', line 544 def initialize(operand, **rest) # `sizeof` operator accepts expr or type as its operand. @operand = operand super **rest end |
Instance Attribute Details
#operand ⇒ Object (readonly)
Returns the value of attribute operand.
542 543 544 |
# File 'lib/chelsy/ast.rb', line 542 def operand @operand end |