Top Level Namespace

Defined Under Namespace

Classes: ClubHopper

Instance Method Summary collapse

Instance Method Details

#goodbyeObject



136
137
138
139
# File 'lib/club_hopper/cli.rb', line 136

def goodbye
 puts "See you next time for the hottest techno/house music events in NYC!!"
 exit
end

#list_friday_event_cieloObject



92
93
94
95
96
97
98
# File 'lib/club_hopper/cli.rb', line 92

def list_friday_event_cielo
  puts "This Friday's Event at Cielo NYC!"
  @events = ClubHopper::Cielo.this_friday_cielo
  @events.each.with_index(1) do |event, i|
  puts "#{i}. #{event.date} - #{event.name} "
  end
end

#list_friday_event_outputObject



76
77
78
79
80
81
82
# File 'lib/club_hopper/cli.rb', line 76

def list_friday_event_output
  puts "This Friday's Event at Output Brooklyn!"
  @events = ClubHopper::Output.this_friday_output
  @events.each.with_index(1) do |event, i|
  puts "#{i}. #{event.name} - #{event.date}"
  end
end

#list_saturday_event_cieloObject



102
103
104
105
106
107
108
109
# File 'lib/club_hopper/cli.rb', line 102

def list_saturday_event_cielo
 puts "This Saturday's Event at Cielo NYC!"
 @events = ClubHopper::Cielo.this_saturday_cielo
 @events.each.with_index(1) do |event, i|
  puts "#{i}. #{event.name} - #{event.date} "

end
end

#list_saturday_event_outputObject



84
85
86
87
88
89
90
# File 'lib/club_hopper/cli.rb', line 84

def list_saturday_event_output
  puts "This Saturday's Event Output Brooklyn!"
  @events = ClubHopper::Output.this_saturday_output
  @events.each.with_index(1) do |event, i|
  puts "#{i}. #{event.name} - #{event.date} "
  end
end


113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# File 'lib/club_hopper/cli.rb', line 113

def menu
  input = nil
  while input != "exit"
     puts "Wanna see what else is going on? Type 'start' to see the start again or 'exit' to exit."
     input = gets.strip.downcase

     if input.to_i > 0
      the_event = @events[input.to_i-1]
      puts "#{the_event.name} - #{the_event.date}"
   elsif input == "start"    
      puts "Ok...let's see what else is goin' on this weekend... "
      call
   elsif input == "exit"
     goodbye
     
  else
     puts "Not sure what you want, take a deep breath...."
     call
  end
  
end
end

#what_day_cieloObject



57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/club_hopper/cli.rb', line 57

def what_day_cielo
    puts "What evening, Friday or Saturday?" 
    puts "----------------------------------------"
    puts <<-DOC 
    1. Friday Night
    2. Saturday Night
    DOC
    input = nil
    input = gets.strip.downcase
     if input == "1"
      list_friday_event_cielo
     elsif input == "2"
      list_saturday_event_cielo
   end
end

#what_day_outputObject



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/club_hopper/cli.rb', line 40

def what_day_output
  puts "What evening, Friday or Saturday?"
  puts "----------------------------------------"
  puts <<-DOC 
   1. Friday Night
   2. Saturday Night
  DOC
  input = nil
  input = gets.strip.downcase
    if input == "1"
    list_friday_event_output
    elsif input == "2"
    list_saturday_event_output
 end
end