Class: Postsvg::Model::Operators::Arithmetic::Ln
- Inherits:
-
Postsvg::Model::Operator
- Object
- Postsvg::Model::Operator
- Postsvg::Model::Operators::Arithmetic::Ln
- Defined in:
- lib/postsvg/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:) ⇒ Ln
constructor
A new instance of Ln.
Methods inherited from Postsvg::Model::Operator
#accept, #operator?, register_as
Constructor Details
#initialize(operand:) ⇒ Ln
Returns a new instance of Ln.
226 227 228 229 |
# File 'lib/postsvg/model/operators/arithmetic.rb', line 226 def initialize(operand:) @operand = operand freeze end |
Instance Attribute Details
#operand ⇒ Object (readonly)
Returns the value of attribute operand.
225 226 227 |
# File 'lib/postsvg/model/operators/arithmetic.rb', line 225 def operand @operand end |
Class Method Details
.from_operands(stack) ⇒ Object
230 231 232 |
# File 'lib/postsvg/model/operators/arithmetic.rb', line 230 def self.from_operands(stack) new(operand: stack.pop_number) end |