Class: Origami::Graphics::DashPattern

Inherits:
Object
  • Object
show all
Defined in:
lib/origami/graphics/path.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(array, phase = 0) ⇒ DashPattern

Returns a new instance of DashPattern.



45
46
47
48
# File 'lib/origami/graphics/path.rb', line 45

def initialize(array, phase = 0)
  @array = array
  @phase = phase
end

Instance Attribute Details

#arrayObject

Returns the value of attribute array.



43
44
45
# File 'lib/origami/graphics/path.rb', line 43

def array
  @array
end

#phaseObject

Returns the value of attribute phase.



43
44
45
# File 'lib/origami/graphics/path.rb', line 43

def phase
  @phase
end

Instance Method Details

#eql?(dash) ⇒ Boolean

:nodoc

Returns:



50
51
52
# File 'lib/origami/graphics/path.rb', line 50

def eql?(dash) #:nodoc
  dash.array == @array and dash.phase == @phase
end

#hashObject

:nodoc:



54
55
56
# File 'lib/origami/graphics/path.rb', line 54

def hash #:nodoc:
  [ @array, @phase ].hash
end