Class: RoadToRubykaigi::Graphics::Player::Direction

Inherits:
Data
  • Object
show all
Defined in:
lib/road_to_rubykaigi/graphics/player.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



14
15
16
# File 'lib/road_to_rubykaigi/graphics/player.rb', line 14

def value
  @value
end

Instance Method Details

#nameObject



16
# File 'lib/road_to_rubykaigi/graphics/player.rb', line 16

def name = right? ? 'RIGHT' : 'LEFT'

#right?Boolean

Returns:

  • (Boolean)


15
# File 'lib/road_to_rubykaigi/graphics/player.rb', line 15

def right? = value == RIGHT