Class: Postscript::Model::Operators::Transformations::Setmatrix
- Inherits:
-
Postscript::Model::Operator
- Object
- Postscript::Model::Operator
- Postscript::Model::Operators::Transformations::Setmatrix
- Defined in:
- lib/postscript/model/operators/transformations.rb
Instance Attribute Summary collapse
-
#matrix ⇒ Object
readonly
Returns the value of attribute matrix.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(matrix:) ⇒ Setmatrix
constructor
A new instance of Setmatrix.
Methods inherited from Postscript::Model::Operator
#accept, #operator?, register_as
Constructor Details
#initialize(matrix:) ⇒ Setmatrix
Returns a new instance of Setmatrix.
72 73 74 75 |
# File 'lib/postscript/model/operators/transformations.rb', line 72 def initialize(matrix:) @matrix = matrix freeze end |
Instance Attribute Details
#matrix ⇒ Object (readonly)
Returns the value of attribute matrix.
71 72 73 |
# File 'lib/postscript/model/operators/transformations.rb', line 71 def matrix @matrix end |
Class Method Details
.from_operands(stack) ⇒ Object
76 77 78 |
# File 'lib/postscript/model/operators/transformations.rb', line 76 def self.from_operands(stack) new(matrix: stack.pop) end |