Class: Postscript::Model::Operators::Path::Rlineto
- Inherits:
-
Postscript::Model::Operator
- Object
- Postscript::Model::Operator
- Postscript::Model::Operators::Path::Rlineto
- Defined in:
- lib/postscript/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:) ⇒ Rlineto
constructor
A new instance of Rlineto.
Methods inherited from Postscript::Model::Operator
#accept, #operator?, register_as
Constructor Details
#initialize(dx:, dy:) ⇒ Rlineto
Returns a new instance of Rlineto.
59 60 61 62 63 |
# File 'lib/postscript/model/operators/path.rb', line 59 def initialize(dx:, dy:) @dx = dx @dy = dy freeze end |
Instance Attribute Details
#dx ⇒ Object (readonly)
Returns the value of attribute dx.
58 59 60 |
# File 'lib/postscript/model/operators/path.rb', line 58 def dx @dx end |
#dy ⇒ Object (readonly)
Returns the value of attribute dy.
58 59 60 |
# File 'lib/postscript/model/operators/path.rb', line 58 def dy @dy end |
Class Method Details
.from_operands(stack) ⇒ Object
64 65 66 67 68 |
# File 'lib/postscript/model/operators/path.rb', line 64 def self.from_operands(stack) dy = stack.pop_number dx = stack.pop_number new(dx: dx, dy: dy) end |