Class: Postsvg::Model::Operators::Arithmetic::Cos
- Inherits:
-
Postsvg::Model::Operator
- Object
- Postsvg::Model::Operator
- Postsvg::Model::Operators::Arithmetic::Cos
- 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:) ⇒ Cos
constructor
A new instance of Cos.
Methods inherited from Postsvg::Model::Operator
#accept, #operator?, register_as
Constructor Details
#initialize(operand:) ⇒ Cos
Returns a new instance of Cos.
202 203 204 205 |
# File 'lib/postsvg/model/operators/arithmetic.rb', line 202 def initialize(operand:) @operand = operand freeze end |
Instance Attribute Details
#operand ⇒ Object (readonly)
Returns the value of attribute operand.
201 202 203 |
# File 'lib/postsvg/model/operators/arithmetic.rb', line 201 def operand @operand end |
Class Method Details
.from_operands(stack) ⇒ Object
206 207 208 |
# File 'lib/postsvg/model/operators/arithmetic.rb', line 206 def self.from_operands(stack) new(operand: stack.pop_number) end |