class SeatGeek::Taxonomies::Sports

Attributes

parent_id[RW]
taxonomies[RW]

Public Class Methods

new(child_taxonomies:, file_path:, type:) click to toggle source
# File lib/seat_geek/taxonomies/sports.rb, line 4
def initialize(child_taxonomies:, file_path:, type:)
  @taxonomies = child_taxonomies
  @yaml_hash = YAML.load_file(file_path).fetch('event_parent_id').fetch(type)
end

Public Instance Methods

all() click to toggle source
# File lib/seat_geek/taxonomies/sports.rb, line 9
def all
  taxonomies
end
animal_sports() click to toggle source
# File lib/seat_geek/taxonomies/sports.rb, line 53
def animal_sports
  @parent_id = @yaml_hash.fetch('animal_sports')
  build_tree
end
auto_racing() click to toggle source
# File lib/seat_geek/taxonomies/sports.rb, line 33
def auto_racing
  @parent_id = @yaml_hash.fetch('auto_racing')
  build_tree
end
baseball() click to toggle source
# File lib/seat_geek/taxonomies/sports.rb, line 13
def baseball
  @parent_id = @yaml_hash.fetch('baseball')
  build_tree
end
basketball() click to toggle source
# File lib/seat_geek/taxonomies/sports.rb, line 18
def basketball
  @parent_id = @yaml_hash.fetch('basketball')
  build_tree
end
extreme_sports() click to toggle source
# File lib/seat_geek/taxonomies/sports.rb, line 58
def extreme_sports
  @parent_id = @yaml_hash.fetch('extreme_sports')
  build_tree
end
fighting() click to toggle source
# File lib/seat_geek/taxonomies/sports.rb, line 43
def fighting
  @parent_id = @yaml_hash.fetch('fighting')
  build_tree
end
football() click to toggle source
# File lib/seat_geek/taxonomies/sports.rb, line 28
def football
  @parent_id = @yaml_hash.fetch('football')
  build_tree
end
golf() click to toggle source
# File lib/seat_geek/taxonomies/sports.rb, line 38
def golf
  @parent_id = @yaml_hash.fetch('golf')
  build_tree
end
hockey() click to toggle source
# File lib/seat_geek/taxonomies/sports.rb, line 23
def hockey
  @parent_id = @yaml_hash.fetch('hockey')
  build_tree
end
olympic_sports() click to toggle source
# File lib/seat_geek/taxonomies/sports.rb, line 63
def olympic_sports
  @parent_id = @yaml_hash.fetch('olympic_sports')
  build_tree
end
tennis() click to toggle source
# File lib/seat_geek/taxonomies/sports.rb, line 48
def tennis
  @parent_id = @yaml_hash.fetch('tennis')
  build_tree
end