-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcategories.rb
47 lines (42 loc) · 907 Bytes
/
categories.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
module Categories
class Gertuko
EDUCATION=0
ENTERTAINMENT=1
ADVENTURE=2
GRUB=3
ALL=[EDUCATION,ENTERTAINMENT, ADVENTURE, GRUB]
end
class BoiseWeekly
@music = %w(Music
Alternative
Americana
Blues
Country
Electronic
Hip-Hop/Rap
Jazz
Metal
Pop
Punk
R&B
Reggae
Rock
Singer-Songwriter
Variety
World)
@adventure = ['Sports & Fitness']
@entertainment = ['Festivals & Events']
@grub = ['Food & Drink']
def self.parse_from_string category
if @music.include? category or @entertainment.include? category
Categories::Gertuko::ENTERTAINMENT
elsif @adventure.include? category
Categories::Gertuko::ADVENTURE
elsif @grub.include? category
Categories::Gertuko::GRUB
else
Categories::Gertuko::ENTERTAINMENT
end
end
end
end