Class: GamesAndRpgParadise::ShakesAndFidgets::PostOffice

Inherits:
Object
  • Object
show all
Defined in:
lib/games_and_rpg_paradise/games/shakes_and_fidgets/post_office/post_office.rb

Instance Method Summary collapse

Constructor Details

#initializePostOffice

#

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

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 menu(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.
      menu(get_user_input)
    end
    break if i == 'q'
  }
end

#show_helpObject

#

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