Class: Postscript::Model::Operators::Transformations::Rotate
- Inherits:
-
Postscript::Model::Operator
- Object
- Postscript::Model::Operator
- Postscript::Model::Operators::Transformations::Rotate
- Defined in:
- lib/postscript/model/operators/transformations.rb
Instance Attribute Summary collapse
-
#angle ⇒ Object
readonly
Returns the value of attribute angle.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(angle:) ⇒ Rotate
constructor
A new instance of Rotate.
Methods inherited from Postscript::Model::Operator
#accept, #operator?, register_as
Constructor Details
#initialize(angle:) ⇒ Rotate
Returns a new instance of Rotate.
40 41 42 43 |
# File 'lib/postscript/model/operators/transformations.rb', line 40 def initialize(angle:) @angle = angle freeze end |
Instance Attribute Details
#angle ⇒ Object (readonly)
Returns the value of attribute angle.
39 40 41 |
# File 'lib/postscript/model/operators/transformations.rb', line 39 def angle @angle end |
Class Method Details
.from_operands(stack) ⇒ Object
44 45 46 |
# File 'lib/postscript/model/operators/transformations.rb', line 44 def self.from_operands(stack) new(angle: stack.pop_number) end |