Class: Codebreaker::Console

Inherits:
Object
  • Object
show all
Includes:
Storage
Defined in:
lib/codebreaker/console.rb

Constant Summary

Constants included from Storage

Storage::FILE_NAME, Storage::PATH

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Storage

#load_database, #save, #sort_player

Instance Attribute Details

#gameObject (readonly)

Returns the value of attribute game.



6
7
8
# File 'lib/codebreaker/console.rb', line 6

def game
  @game
end

#guessObject (readonly)

Returns the value of attribute guess.



6
7
8
# File 'lib/codebreaker/console.rb', line 6

def guess
  @guess
end

#playerObject (readonly)

Returns the value of attribute player.



6
7
8
# File 'lib/codebreaker/console.rb', line 6

def player
  @player
end

Instance Method Details

#welcome_messageObject



8
9
10
11
# File 'lib/codebreaker/console.rb', line 8

def welcome_message
  output(:welcome_message)
  run
end