Class: Guide::EndpointStocktaker

Inherits:
Object
  • Object
show all
Defined in:
app/models/guide/endpoint_stocktaker.rb

Defined Under Namespace

Classes: BribedBouncer

Instance Method Summary collapse

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_hashObject



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