Class: CodebreakerRuban::Message
- Inherits:
-
Object
- Object
- CodebreakerRuban::Message
- Defined in:
- lib/app/entities/message.rb
Class Method Summary collapse
- .choice_difficulty(easy, medium, hell) ⇒ Object
- .choice_option(stats, rules, start, exit) ⇒ Object
- .display(message) ⇒ Object
- .ended_attempts ⇒ Object
- .enter_code ⇒ Object
- .enter_name ⇒ Object
- .error_difficulty ⇒ Object
- .error_guess_code ⇒ Object
- .error_name_size(range) ⇒ Object
- .goodbye ⇒ Object
- .greeting ⇒ Object
- .lose ⇒ Object
- .restart ⇒ Object
- .result_save ⇒ Object
- .rules ⇒ Object
- .save ⇒ Object
- .show_secret_code(secret_code) ⇒ Object
- .show_stats(**value) ⇒ Object
- .statistic_empty ⇒ Object
- .win ⇒ Object
- .wrong_command ⇒ Object
Class Method Details
.choice_difficulty(easy, medium, hell) ⇒ Object
42 43 44 |
# File 'lib/app/entities/message.rb', line 42 def choice_difficulty(easy, medium, hell) puts I18n.t(:choice_difficulty, easy: easy, medium: medium, hell: hell) end |
.choice_option(stats, rules, start, exit) ⇒ Object
26 27 28 |
# File 'lib/app/entities/message.rb', line 26 def choice_option(stats, rules, start, exit) puts I18n.t(:choice_option, stats: stats, rules: rules, start: start, exit: exit) end |
.display(message) ⇒ Object
6 7 8 |
# File 'lib/app/entities/message.rb', line 6 def display() puts end |
.ended_attempts ⇒ Object
54 55 56 |
# File 'lib/app/entities/message.rb', line 54 def ended_attempts puts I18n.t(:ended_attempts) end |
.enter_code ⇒ Object
46 47 48 |
# File 'lib/app/entities/message.rb', line 46 def enter_code puts I18n.t(:enter_code) end |
.enter_name ⇒ Object
38 39 40 |
# File 'lib/app/entities/message.rb', line 38 def enter_name puts I18n.t(:enter_name) end |
.error_difficulty ⇒ Object
14 15 16 |
# File 'lib/app/entities/message.rb', line 14 def error_difficulty puts I18n.t('errors.error_difficulty') end |
.error_guess_code ⇒ Object
18 19 20 |
# File 'lib/app/entities/message.rb', line 18 def error_guess_code I18n.t('errors.error_guess_code') end |
.error_name_size(range) ⇒ Object
10 11 12 |
# File 'lib/app/entities/message.rb', line 10 def error_name_size(range) I18n.t('errors.error_name_size', min: range.first, max: range.last) end |
.goodbye ⇒ Object
50 51 52 |
# File 'lib/app/entities/message.rb', line 50 def goodbye puts I18n.t(:goodbye) end |
.greeting ⇒ Object
22 23 24 |
# File 'lib/app/entities/message.rb', line 22 def greeting puts I18n.t(:greeting) end |
.lose ⇒ Object
82 83 84 |
# File 'lib/app/entities/message.rb', line 82 def lose puts I18n.t(:lose) end |
.restart ⇒ Object
66 67 68 |
# File 'lib/app/entities/message.rb', line 66 def restart puts I18n.t(:restart) end |
.result_save ⇒ Object
62 63 64 |
# File 'lib/app/entities/message.rb', line 62 def result_save puts I18n.t(:result_save) end |
.rules ⇒ Object
30 31 32 |
# File 'lib/app/entities/message.rb', line 30 def rules puts I18n.t(:rules) end |
.save ⇒ Object
58 59 60 |
# File 'lib/app/entities/message.rb', line 58 def save puts I18n.t(:save) end |
.show_secret_code(secret_code) ⇒ Object
86 87 88 |
# File 'lib/app/entities/message.rb', line 86 def show_secret_code(secret_code) puts I18n.t(:show_secret_code, secret_code: secret_code) end |
.show_stats(**value) ⇒ Object
74 75 76 |
# File 'lib/app/entities/message.rb', line 74 def show_stats(**value) puts I18n.t(:show_stats, **value) end |
.statistic_empty ⇒ Object
70 71 72 |
# File 'lib/app/entities/message.rb', line 70 def statistic_empty puts I18n.t(:statistic_empty) end |
.win ⇒ Object
78 79 80 |
# File 'lib/app/entities/message.rb', line 78 def win puts I18n.t(:win) end |
.wrong_command ⇒ Object
34 35 36 |
# File 'lib/app/entities/message.rb', line 34 def wrong_command puts I18n.t(:wrong_command) end |