Class: SeatGeek::Taxonomies::Concert

Inherits:
ChildTree
  • Object
show all
Defined in:
lib/seat_geek/taxonomies/concert.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ChildTree

#build_child_tree

Constructor Details

#initialize(child_taxonomies:, file_path:, type:) ⇒ Concert

Returns a new instance of Concert.



4
5
6
7
# File 'lib/seat_geek/taxonomies/concert.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

Instance Attribute Details

#parent_idObject

Returns the value of attribute parent_id.



18
19
20
# File 'lib/seat_geek/taxonomies/concert.rb', line 18

def parent_id
  @parent_id
end

#taxonomiesObject

Returns the value of attribute taxonomies.



18
19
20
# File 'lib/seat_geek/taxonomies/concert.rb', line 18

def taxonomies
  @taxonomies
end

Instance Method Details

#allObject



9
10
11
# File 'lib/seat_geek/taxonomies/concert.rb', line 9

def all
  taxonomies
end

#music_festivalObject



13
14
15
16
# File 'lib/seat_geek/taxonomies/concert.rb', line 13

def music_festival
  @parent_id = @yaml_hash.fetch('music_festival')
  build_tree
end