Class: Savage::Directions::ClosePath

Inherits:
Savage::Direction show all
Defined in:
lib/savage/directions/close_path.rb

Instance Method Summary collapse

Methods inherited from Savage::Direction

#absolute?, #fully_transformable?, #relative?, #to_command

Methods included from Transformable

#rotate, #scale, #skew_x, #skew_y, #transform, #translate

Methods included from Utils

#bool_to_int

Constructor Details

#initialize(absolute = true) ⇒ ClosePath

Returns a new instance of ClosePath.



5
6
7
# File 'lib/savage/directions/close_path.rb', line 5

def initialize(absolute=true)
  super(absolute)
end

Instance Method Details

#command_codeObject



13
14
15
# File 'lib/savage/directions/close_path.rb', line 13

def command_code
  (absolute?) ? 'Z' : 'z'
end

#movementObject



17
18
19
# File 'lib/savage/directions/close_path.rb', line 17

def movement
  [0, 0]
end

#to_aObject



9
10
11
# File 'lib/savage/directions/close_path.rb', line 9

def to_a
  [command_code]
end