Class: CodebreakerGem::Output

Inherits:
OutputHelper show all
Defined in:
lib/app/helpers/output.rb

Constant Summary collapse

MESSAGE =
'message'

Instance Method Summary collapse

Methods inherited from OutputHelper

#display, #get

Instance Method Details

#difficulty_headingObject



24
25
26
27
# File 'lib/app/helpers/output.rb', line 24

def difficulty_heading
  message(:difficulty_heading)
  display(Difficulty.list)
end

#exitObject



33
34
35
# File 'lib/app/helpers/output.rb', line 33

def exit
  message(:exit)
end

#game_start_headingObject



20
21
22
# File 'lib/app/helpers/output.rb', line 20

def game_start_heading
  message(:game_start_heading)
end

#introductionObject



7
8
9
# File 'lib/app/helpers/output.rb', line 7

def introduction
  message(:introduction)
end

#registrationObject



15
16
17
18
# File 'lib/app/helpers/output.rb', line 15

def registration
  message(:registration_heading)
  message(:player_name_registration)
end

#rulesObject



11
12
13
# File 'lib/app/helpers/output.rb', line 11

def rules
  message(:rules)
end

#save_resultObject



46
47
48
# File 'lib/app/helpers/output.rb', line 46

def save_result
  message(:save_result)
end

#start_new_gameObject



50
51
52
# File 'lib/app/helpers/output.rb', line 50

def start_new_game
  message(:start_new_game)
end

#statistics(game) ⇒ Object



37
38
39
40
41
42
43
44
# File 'lib/app/helpers/output.rb', line 37

def statistics(game)
  message(:statistics,
          used_attempts: game.used_attempts,
          total_attempts: game.total_attempts,
          used_hints: game.used_hints,
          total_hints: game.total_hints)
  message(:input_secret_code)
end

#winObject



29
30
31
# File 'lib/app/helpers/output.rb', line 29

def win
  message(:win)
end