Class: SeatGeek::Taxonomies::Tree
- Inherits:
-
Object
- Object
- SeatGeek::Taxonomies::Tree
- Defined in:
- lib/seat_geek/taxonomies/tree.rb
Constant Summary collapse
- FILE_PATH =
"/Users/johnmoon/Desktop/side_projects/seat_geek/lib/seat_geek/yaml/event_parent_id.yaml"
Instance Attribute Summary collapse
-
#parent_ids ⇒ Object
Returns the value of attribute parent_ids.
-
#taxonomies ⇒ Object
Returns the value of attribute taxonomies.
Instance Method Summary collapse
- #all ⇒ Object
- #concert ⇒ Object
-
#initialize(parent_ids:, taxonomies:) ⇒ Tree
constructor
A new instance of Tree.
- #sports ⇒ Object
- #theater ⇒ Object
Constructor Details
#initialize(parent_ids:, taxonomies:) ⇒ Tree
Returns a new instance of Tree.
5 6 7 8 9 |
# File 'lib/seat_geek/taxonomies/tree.rb', line 5 def initialize(parent_ids:, taxonomies:) @parent_ids = parent_ids @taxonomies = taxonomies build_tree end |
Instance Attribute Details
#parent_ids ⇒ Object
Returns the value of attribute parent_ids.
27 28 29 |
# File 'lib/seat_geek/taxonomies/tree.rb', line 27 def parent_ids @parent_ids end |
#taxonomies ⇒ Object
Returns the value of attribute taxonomies.
27 28 29 |
# File 'lib/seat_geek/taxonomies/tree.rb', line 27 def taxonomies @taxonomies end |
Instance Method Details
#all ⇒ Object
11 12 13 |
# File 'lib/seat_geek/taxonomies/tree.rb', line 11 def all finished_tree end |
#concert ⇒ Object
19 20 21 |
# File 'lib/seat_geek/taxonomies/tree.rb', line 19 def concert finished_tree[:concert] end |
#sports ⇒ Object
15 16 17 |
# File 'lib/seat_geek/taxonomies/tree.rb', line 15 def sports finished_tree[:sports] end |
#theater ⇒ Object
23 24 25 |
# File 'lib/seat_geek/taxonomies/tree.rb', line 23 def theater finished_tree[:theater] end |