Class: Postscript::Model::Operators::Container::String
- Inherits:
-
Postscript::Model::Operator
- Object
- Postscript::Model::Operator
- Postscript::Model::Operators::Container::String
- Defined in:
- lib/postscript/model/operators/container.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
readonly
Returns the value of attribute count.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(count:) ⇒ String
constructor
A new instance of String.
Methods inherited from Postscript::Model::Operator
#accept, #operator?, register_as
Constructor Details
#initialize(count:) ⇒ String
Returns a new instance of String.
160 161 162 163 |
# File 'lib/postscript/model/operators/container.rb', line 160 def initialize(count:) @count = count freeze end |
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count.
159 160 161 |
# File 'lib/postscript/model/operators/container.rb', line 159 def count @count end |
Class Method Details
.from_operands(stack) ⇒ Object
164 165 166 |
# File 'lib/postscript/model/operators/container.rb', line 164 def self.from_operands(stack) new(count: stack.pop_number.to_i) end |