Class: Main_Menu

Inherits:
Object
  • Object
show all
Defined in:
lib/jamii.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#inputObject

Returns the value of attribute input.



10
11
12
# File 'lib/jamii.rb', line 10

def input
  @input
end

Returns the value of attribute main_menu.



8
9
10
# File 'lib/jamii.rb', line 8

def main_menu
  @main_menu
end

#org_infoObject

Returns the value of attribute org_info.



9
10
11
# File 'lib/jamii.rb', line 9

def org_info
  @org_info
end

Instance Method Details



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/jamii.rb', line 12

def main_menu_display input = 1
display = "Welcome to Jamii your meeting attendance manager.\nPlease see the following options below.
\nType 1 for #{Type_1}
  \nType 2 for #{Type_2}
  \nType 3 for #{Type_3}
  \nType 4 for #{Type_4}"

  puts "#{display}"

  input = gets.chomp.to_i

  next_stop = main_menu_selection(input)
end


26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/jamii.rb', line 26

def main_menu_selection (input)
  case input
    when input == 1
      puts "#{Type_1}"
      @org_info = Admin.new
      @org_info.create_organization
    when input ==  2
      puts "#{Type_2}"
      @org_info.roster
    when input ==  3
      puts "#{Type_3}"
    when input ==  4
      puts "#{Type_4}"
  end
end