Class: ScraperWiki::API::Matchers::KeysMatcher
Instance Method Summary
collapse
Instance Method Details
#difference ⇒ Object
286
287
288
|
# File 'lib/scraperwiki-api/matchers.rb', line 286
def difference
raise NotImplementerError, 'Subclasses must implement this method'
end
|
#failure_message ⇒ Object
270
271
272
|
# File 'lib/scraperwiki-api/matchers.rb', line 270
def failure_message
"#{@actual['short_name']} #{failure_predicate}: #{difference.join ', '}"
end
|
#failure_predicate ⇒ Object
278
279
280
|
# File 'lib/scraperwiki-api/matchers.rb', line 278
def failure_predicate
raise NotImplementerError, 'Subclasses must implement this method'
end
|
#matches?(actual) ⇒ Boolean
265
266
267
268
|
# File 'lib/scraperwiki-api/matchers.rb', line 265
def matches?(actual)
super
difference.empty?
end
|
#negative_failure_message ⇒ Object
274
275
276
|
# File 'lib/scraperwiki-api/matchers.rb', line 274
def negative_failure_message
"#{@actual['short_name']} #{negative_failure_predicate}: #{difference.join ', '}"
end
|