class Adhearsion::CallController::MenuDSL::CalculatedMatchCollection
Attributes
actual_exact_matches[R]
actual_potential_matches[R]
calculated_matches[R]
exact_matches[R]
potential_matches[R]
Public Class Methods
new()
click to toggle source
# File lib/adhearsion/call_controller/menu_dsl/calculated_match_collection.rb, line 10 def initialize @calculated_matches = [] @potential_matches = [] @exact_matches = [] @actual_potential_matches = [] @actual_exact_matches = [] end
Public Instance Methods
<<(calculated_match)
click to toggle source
# File lib/adhearsion/call_controller/menu_dsl/calculated_match_collection.rb, line 18 def <<(calculated_match) calculated_matches << calculated_match actual_potential_matches.concat calculated_match.potential_matches actual_exact_matches.concat calculated_match.exact_matches potential_matches << calculated_match if calculated_match.potential_match? exact_matches << calculated_match if calculated_match.exact_match? end
exact_match?()
click to toggle source
# File lib/adhearsion/call_controller/menu_dsl/calculated_match_collection.rb, line 39 def exact_match? exact_match_count > 0 end
exact_match_count()
click to toggle source
# File lib/adhearsion/call_controller/menu_dsl/calculated_match_collection.rb, line 31 def exact_match_count actual_exact_matches.size end
potential_match?()
click to toggle source
# File lib/adhearsion/call_controller/menu_dsl/calculated_match_collection.rb, line 35 def potential_match? potential_match_count > 0 end
potential_match_count()
click to toggle source
# File lib/adhearsion/call_controller/menu_dsl/calculated_match_collection.rb, line 27 def potential_match_count actual_potential_matches.size end