Class: SeatGeek::Taxonomies::Concert
- Defined in:
- lib/seat_geek/taxonomies/concert.rb
Instance Attribute Summary collapse
-
#parent_id ⇒ Object
Returns the value of attribute parent_id.
-
#taxonomies ⇒ Object
Returns the value of attribute taxonomies.
Instance Method Summary collapse
- #all ⇒ Object
-
#initialize(child_taxonomies:, file_path:, type:) ⇒ Concert
constructor
A new instance of Concert.
- #music_festival ⇒ Object
Methods inherited from ChildTree
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_id ⇒ Object
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 |
#taxonomies ⇒ Object
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
#all ⇒ Object
9 10 11 |
# File 'lib/seat_geek/taxonomies/concert.rb', line 9 def all taxonomies end |
#music_festival ⇒ Object
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 |