Class: Postscript::Model::Operators::Container::Length
- Inherits:
-
Postscript::Model::Operator
- Object
- Postscript::Model::Operator
- Postscript::Model::Operators::Container::Length
- Defined in:
- lib/postscript/model/operators/container.rb
Instance Attribute Summary collapse
-
#operand ⇒ Object
readonly
Returns the value of attribute operand.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(operand:) ⇒ Length
constructor
A new instance of Length.
Methods inherited from Postscript::Model::Operator
#accept, #operator?, register_as
Constructor Details
#initialize(operand:) ⇒ Length
Returns a new instance of Length.
10 11 12 13 |
# File 'lib/postscript/model/operators/container.rb', line 10 def initialize(operand:) @operand = operand freeze end |
Instance Attribute Details
#operand ⇒ Object (readonly)
Returns the value of attribute operand.
9 10 11 |
# File 'lib/postscript/model/operators/container.rb', line 9 def operand @operand end |
Class Method Details
.from_operands(stack) ⇒ Object
14 15 16 |
# File 'lib/postscript/model/operators/container.rb', line 14 def self.from_operands(stack) new(operand: stack.pop) end |