I'm getting this error message that says rb:10:in 'activities': undefined local variable or method 'beach_bum' for main:Object
I'm calling the method/function by typing in activities, I'm not sure what I'm missing here? My code is listed below.
def activities
puts " Hi, groupFish friends, you are in Beautiful San Diego Today."
puts "Do you want to check out La Jolla Beach swipe left or check out Coachella swipe right?"
puts "There are 25 things that are happening within 5 miles!"
print ">"
choice = $stdin.gets.chomp
if choice == "left"
beach_bum
elsif choice == "right"
coachella
else
puts "Keep on swiping and be sure use the search hashtag feature to find activities!"
end
end
activities
def beach_bum
puts " Tera and John are here watching the seals, care to join?"
puts " Do you want to meet them? Y or N."
choice= $stdin.gets.chomp
if choice == "Y"
puts "Great, we'll see you at the cove in 15 minutes."
exit(0)
elsif choice == "N"
puts " Keep swiping, there's rock climbing nearby"
else puts " Jamba Juice is having a free smoothie before 2pm, it's 2miles away"
end
end
def coachella
puts " Heck Yeah, you are about to enter one of the biggest concerts of all time"
puts " There are a total of 10,000 party goers today"
end