Class: Postscript::Model::Operators::Arithmetic::Log
- Inherits:
-
Postscript::Model::Operator
- Object
- Postscript::Model::Operator
- Postscript::Model::Operators::Arithmetic::Log
- 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:) ⇒ Log
constructor
A new instance of Log.
Methods inherited from Postscript::Model::Operator
#accept, #operator?, register_as
Constructor Details
#initialize(operand:) ⇒ Log
Returns a new instance of Log.
238 239 240 241 |
# File 'lib/postscript/model/operators/arithmetic.rb', line 238 def initialize(operand:) @operand = operand freeze end |
Instance Attribute Details
#operand ⇒ Object (readonly)
Returns the value of attribute operand.
237 238 239 |
# File 'lib/postscript/model/operators/arithmetic.rb', line 237 def operand @operand end |
Class Method Details
.from_operands(stack) ⇒ Object
242 243 244 |
# File 'lib/postscript/model/operators/arithmetic.rb', line 242 def self.from_operands(stack) new(operand: stack.pop_number) end |