Class: Postscript::Model::Operators::GraphicsState::Setlinejoin
- Inherits:
-
Postscript::Model::Operator
- Object
- Postscript::Model::Operator
- Postscript::Model::Operators::GraphicsState::Setlinejoin
- Defined in:
- lib/postscript/model/operators/graphics_state.rb
Instance Attribute Summary collapse
-
#join_code ⇒ Object
readonly
Returns the value of attribute join_code.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(join_code:) ⇒ Setlinejoin
constructor
A new instance of Setlinejoin.
Methods inherited from Postscript::Model::Operator
#accept, #operator?, register_as
Constructor Details
#initialize(join_code:) ⇒ Setlinejoin
Returns a new instance of Setlinejoin.
46 47 48 49 |
# File 'lib/postscript/model/operators/graphics_state.rb', line 46 def initialize(join_code:) @join_code = join_code.to_i freeze end |
Instance Attribute Details
#join_code ⇒ Object (readonly)
Returns the value of attribute join_code.
45 46 47 |
# File 'lib/postscript/model/operators/graphics_state.rb', line 45 def join_code @join_code end |
Class Method Details
.from_operands(stack) ⇒ Object
50 51 52 |
# File 'lib/postscript/model/operators/graphics_state.rb', line 50 def self.from_operands(stack) new(join_code: stack.pop_number.to_i) end |