Class: Postsvg::Model::Operators::Path::Rmoveto
- Inherits:
-
Postsvg::Model::Operator
- Object
- Postsvg::Model::Operator
- Postsvg::Model::Operators::Path::Rmoveto
- Defined in:
- lib/postsvg/model/operators/path.rb
Instance Attribute Summary collapse
-
#dx ⇒ Object
readonly
Returns the value of attribute dx.
-
#dy ⇒ Object
readonly
Returns the value of attribute dy.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(dx:, dy:) ⇒ Rmoveto
constructor
A new instance of Rmoveto.
Methods inherited from Postsvg::Model::Operator
#accept, #operator?, register_as
Constructor Details
#initialize(dx:, dy:) ⇒ Rmoveto
Returns a new instance of Rmoveto.
29 30 31 32 33 |
# File 'lib/postsvg/model/operators/path.rb', line 29 def initialize(dx:, dy:) @dx = dx @dy = dy freeze end |
Instance Attribute Details
#dx ⇒ Object (readonly)
Returns the value of attribute dx.
28 29 30 |
# File 'lib/postsvg/model/operators/path.rb', line 28 def dx @dx end |
#dy ⇒ Object (readonly)
Returns the value of attribute dy.
28 29 30 |
# File 'lib/postsvg/model/operators/path.rb', line 28 def dy @dy end |
Class Method Details
.from_operands(stack) ⇒ Object
34 35 36 37 38 |
# File 'lib/postsvg/model/operators/path.rb', line 34 def self.from_operands(stack) dy = stack.pop_number dx = stack.pop_number new(dx: dx, dy: dy) end |