Class: Postscript::Model::Operators::ControlFlow::Exec
- Inherits:
-
Postscript::Model::Operator
- Object
- Postscript::Model::Operator
- Postscript::Model::Operators::ControlFlow::Exec
- Defined in:
- lib/postscript/model/operators/control_flow.rb
Instance Attribute Summary collapse
-
#operand ⇒ Object
readonly
Returns the value of attribute operand.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(operand:) ⇒ Exec
constructor
A new instance of Exec.
Methods inherited from Postscript::Model::Operator
#accept, #operator?, register_as
Constructor Details
#initialize(operand:) ⇒ Exec
Returns a new instance of Exec.
96 97 98 99 |
# File 'lib/postscript/model/operators/control_flow.rb', line 96 def initialize(operand:) @operand = operand freeze end |
Instance Attribute Details
#operand ⇒ Object (readonly)
Returns the value of attribute operand.
95 96 97 |
# File 'lib/postscript/model/operators/control_flow.rb', line 95 def operand @operand end |
Class Method Details
.from_operands(stack) ⇒ Object
100 101 102 |
# File 'lib/postscript/model/operators/control_flow.rb', line 100 def self.from_operands(stack) new(operand: stack.pop) end |