class Object
Public Instance Methods
category()
click to toggle source
# File lib/tree_people/category.rb, line 1 def category options_for_categories select_option("category") list_selection_events event_details end
day_of_week()
click to toggle source
# File lib/tree_people/day_of_week.rb, line 1 def day_of_week options_for_day select_option("day") list_selection_events event_details end
get_all_events()
click to toggle source
# File lib/tree_people/all_events.rb, line 7 def get_all_events Event.all.each do |event| @available_options << event end end
list_all()
click to toggle source
# File lib/tree_people/all_events.rb, line 1 def list_all get_all_events list_selection_events event_details end
location()
click to toggle source
# File lib/tree_people/location.rb, line 1 def location options_for_locations select_option("location") list_selection_events event_details end
options_for_categories()
click to toggle source
# File lib/tree_people/category.rb, line 8 def options_for_categories puts "We offer the following types of events:" categories = Event.all.collect{|event| event.category}.uniq options(categories) end
options_for_day()
click to toggle source
# File lib/tree_people/day_of_week.rb, line 8 def options_for_day puts "We have upcoming events on the following days:" days = Event.all.collect{|event| event.day}.uniq options(days) end
options_for_locations()
click to toggle source
# File lib/tree_people/location.rb, line 8 def options_for_locations puts "We have upcoming events at the following locations:" locations = Event.all.collect{|event| event.location}.uniq options(locations) end
options_for_time()
click to toggle source
# File lib/tree_people/time_of_day.rb, line 8 def options_for_time puts "We have events upcoming during the following times of the day:" times = Event.all.collect{|event| event.time_of_day}.uniq options(times) end
time_of_day()
click to toggle source
# File lib/tree_people/time_of_day.rb, line 1 def time_of_day options_for_time select_option("time of day") list_selection_events event_details end