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?, #to_command

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

#to_aObject



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

def to_a
  [command_code]
end