Class: Postscript::Model::Operators::Container::Putinterval
- Inherits:
-
Postscript::Model::Operator
- Object
- Postscript::Model::Operator
- Postscript::Model::Operators::Container::Putinterval
- Defined in:
- lib/postscript/model/operators/container.rb
Instance Attribute Summary collapse
-
#operand ⇒ Object
readonly
Returns the value of attribute operand.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#start ⇒ Object
readonly
Returns the value of attribute start.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(operand:, start:, source:) ⇒ Putinterval
constructor
A new instance of Putinterval.
Methods inherited from Postscript::Model::Operator
#accept, #operator?, register_as
Constructor Details
#initialize(operand:, start:, source:) ⇒ Putinterval
Returns a new instance of Putinterval.
71 72 73 74 75 76 |
# File 'lib/postscript/model/operators/container.rb', line 71 def initialize(operand:, start:, source:) @operand = operand @start = start @source = source freeze end |
Instance Attribute Details
#operand ⇒ Object (readonly)
Returns the value of attribute operand.
70 71 72 |
# File 'lib/postscript/model/operators/container.rb', line 70 def operand @operand end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
70 71 72 |
# File 'lib/postscript/model/operators/container.rb', line 70 def source @source end |
#start ⇒ Object (readonly)
Returns the value of attribute start.
70 71 72 |
# File 'lib/postscript/model/operators/container.rb', line 70 def start @start end |
Class Method Details
.from_operands(stack) ⇒ Object
77 78 79 80 81 82 |
# File 'lib/postscript/model/operators/container.rb', line 77 def self.from_operands(stack) source = stack.pop start = stack.pop_number.to_i coll = stack.pop new(operand: coll, start: start, source: source) end |