Class: Postscript::Model::Operators::GraphicsState::Setlinejoin

Inherits:
Postscript::Model::Operator show all
Defined in:
lib/postscript/model/operators/graphics_state.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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_codeObject (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