Class: Postscript::Model::Operators::Arithmetic::Ceiling
- Inherits:
-
Postscript::Model::Operator
- Object
- Postscript::Model::Operator
- Postscript::Model::Operators::Arithmetic::Ceiling
- Defined in:
- lib/postscript/model/operators/arithmetic.rb
Instance Attribute Summary collapse
-
#operand ⇒ Object
readonly
Returns the value of attribute operand.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(operand:) ⇒ Ceiling
constructor
A new instance of Ceiling.
Methods inherited from Postscript::Model::Operator
#accept, #operator?, register_as
Constructor Details
#initialize(operand:) ⇒ Ceiling
Returns a new instance of Ceiling.
127 128 129 130 |
# File 'lib/postscript/model/operators/arithmetic.rb', line 127 def initialize(operand:) @operand = operand freeze end |
Instance Attribute Details
#operand ⇒ Object (readonly)
Returns the value of attribute operand.
126 127 128 |
# File 'lib/postscript/model/operators/arithmetic.rb', line 126 def operand @operand end |
Class Method Details
.from_operands(stack) ⇒ Object
131 132 133 |
# File 'lib/postscript/model/operators/arithmetic.rb', line 131 def self.from_operands(stack) new(operand: stack.pop_number) end |