Class: Postsvg::Model::Operators::Arithmetic::Sin
- Inherits:
-
Postsvg::Model::Operator
- Object
- Postsvg::Model::Operator
- Postsvg::Model::Operators::Arithmetic::Sin
- 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:) ⇒ Sin
constructor
A new instance of Sin.
Methods inherited from Postsvg::Model::Operator
#accept, #operator?, register_as
Constructor Details
#initialize(operand:) ⇒ Sin
Returns a new instance of Sin.
214 215 216 217 |
# File 'lib/postsvg/model/operators/arithmetic.rb', line 214 def initialize(operand:) @operand = operand freeze end |
Instance Attribute Details
#operand ⇒ Object (readonly)
Returns the value of attribute operand.
213 214 215 |
# File 'lib/postsvg/model/operators/arithmetic.rb', line 213 def operand @operand end |
Class Method Details
.from_operands(stack) ⇒ Object
218 219 220 |
# File 'lib/postsvg/model/operators/arithmetic.rb', line 218 def self.from_operands(stack) new(operand: stack.pop_number) end |