Class: GamesAndRpgParadise::ShakesAndFidgets::PostOffice
- Inherits:
-
Object
- Object
- GamesAndRpgParadise::ShakesAndFidgets::PostOffice
- Defined in:
- lib/games_and_rpg_paradise/games/shakes_and_fidgets/post_office/post_office.rb
Instance Method Summary collapse
-
#initialize ⇒ PostOffice
constructor
# === initialize ========================================================================= #.
-
#menu(i = nil) ⇒ Object
# === menu.
-
#show_help ⇒ Object
# === show_help ========================================================================= #.
Constructor Details
#initialize ⇒ PostOffice
#
initialize
#
16 17 |
# File 'lib/games_and_rpg_paradise/games/shakes_and_fidgets/post_office/post_office.rb', line 16 def initialize end |
Instance Method Details
#menu(i = nil) ⇒ Object
#
menu
If we give no input then we will grab the user input.
#
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/games_and_rpg_paradise/games/shakes_and_fidgets/post_office/post_office.rb', line 34 def (i = nil) loop { if i case i when 'write' e 'You write a letter.' when 'help' show_help end else # Else also get user input. (get_user_input) end break if i == 'q' } end |
#show_help ⇒ Object
#
show_help
#
22 23 24 25 26 27 |
# File 'lib/games_and_rpg_paradise/games/shakes_and_fidgets/post_office/post_office.rb', line 22 def show_help e 'The following options are available at your disposal:' e ecomment ' - write # write a mail to another character' e end |