Method: Savage::Direction#to_command

Defined in:
lib/ext/savage/lib/savage/direction.rb

#to_commandObject



23
24
25
26
27
28
29
# File 'lib/ext/savage/lib/savage/direction.rb', line 23

def to_command
  arr = to_a
  arr.map! do |x|
    x.to_i == x ? x.to_i : x
  end
  arr[0] + arr[1..-1].join(' ').gsub(/ -/,'-')
end