Module: Direction

Defined in:
lib/direction.rb

Constant Summary collapse

HORIZONTAL =
"Horizontal".freeze
VERTICAL =
"Vertical".freeze

Class Method Summary collapse

Class Method Details

.opposite(direction) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/direction.rb', line 5

def self.opposite(direction)
  if direction == HORIZONTAL
    VERTICAL
  else
    HORIZONTAL
  end
end