Class: Neo4jr::MaxCostEvaluator

Inherits:
Object
  • Object
show all
Defined in:
lib/neo4jr/max_cost_evaluator.rb

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ MaxCostEvaluator

Returns a new instance of MaxCostEvaluator.



5
6
7
# File 'lib/neo4jr/max_cost_evaluator.rb', line 5

def initialize &block
  @evaluator_block = block
end

Instance Method Details

#maxCostExceeded(currentCost) ⇒ Object



9
10
11
# File 'lib/neo4jr/max_cost_evaluator.rb', line 9

def maxCostExceeded currentCost
  @evaluator_block.call currentCost
end