Class: Postsvg::Model::Operators::Transformations::Setmatrix

Inherits:
Postsvg::Model::Operator show all
Defined in:
lib/postsvg/model/operators/transformations.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Postsvg::Model::Operator

#accept, #operator?, register_as

Constructor Details

#initialize(matrix:) ⇒ Setmatrix

Returns a new instance of Setmatrix.



72
73
74
75
# File 'lib/postsvg/model/operators/transformations.rb', line 72

def initialize(matrix:)
  @matrix = matrix
  freeze
end

Instance Attribute Details

#matrixObject (readonly)

Returns the value of attribute matrix.



71
72
73
# File 'lib/postsvg/model/operators/transformations.rb', line 71

def matrix
  @matrix
end

Class Method Details

.from_operands(stack) ⇒ Object



76
77
78
# File 'lib/postsvg/model/operators/transformations.rb', line 76

def self.from_operands(stack)
  new(matrix: stack.pop)
end