Class: Guide::EndpointStocktaker
- Inherits:
-
Object
- Object
- Guide::EndpointStocktaker
- Defined in:
- app/models/guide/endpoint_stocktaker.rb
Defined Under Namespace
Classes: BribedBouncer
Instance Method Summary collapse
-
#initialize(starting_node:) ⇒ EndpointStocktaker
constructor
A new instance of EndpointStocktaker.
- #to_hash ⇒ Object
Constructor Details
#initialize(starting_node:) ⇒ EndpointStocktaker
Returns a new instance of EndpointStocktaker.
2 3 4 5 |
# File 'app/models/guide/endpoint_stocktaker.rb', line 2 def initialize(starting_node:) @starting_node = starting_node @result = {} end |
Instance Method Details
#to_hash ⇒ Object
7 8 9 10 11 |
# File 'app/models/guide/endpoint_stocktaker.rb', line 7 def to_hash @result.tap do add_guide_content if @result.empty? end end |