Exception: Contrast::MatchingException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/contrast/matching_exception.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(results) ⇒ MatchingException

Returns a new instance of MatchingException.



5
6
7
# File 'lib/contrast/matching_exception.rb', line 5

def initialize(results)
  @results = results
end

Instance Attribute Details

#resultsObject

Returns the value of attribute results.



9
10
11
# File 'lib/contrast/matching_exception.rb', line 9

def results
  @results
end

Instance Method Details

#to_sObject



11
12
13
14
# File 'lib/contrast/matching_exception.rb', line 11

def to_s
  return 'The results did not match, but I cannot tell you why.' if results.nil? || results.empty?
  return self.results.ai
end