class Services::Validators::Likelihood
Constants
- RESPONSES
Public Class Methods
new(response, threshold)
click to toggle source
# File lib/services/validators/likelihood.rb, line 16 def initialize(response, threshold) @response, @threshold = response, threshold end
Public Instance Methods
call()
click to toggle source
# File lib/services/validators/likelihood.rb, line 20 def call value_for(@response) > value_for(@threshold) end
Private Instance Methods
value_for(response)
click to toggle source
# File lib/services/validators/likelihood.rb, line 26 def value_for(response) RESPONSES.fetch(response.downcase.to_sym) end