Class: Robot::Commands::Left

Inherits:
Base
  • Object
show all
Defined in:
lib/robot/commands/left.rb

Class Method Summary collapse

Methods inherited from Base

matches

Class Method Details

.call(position) ⇒ Object



10
11
12
# File 'lib/robot/commands/left.rb', line 10

def self.call(position)
  position.left
end

.matches?(command) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/robot/commands/left.rb', line 6

def self.matches?(command)
  command.to_sym == Robot::Directions::LEFT
end