Class: ScraperWiki::API::Matchers::HaveIntegerValues
- Inherits:
-
FieldMatcher
- Object
- CustomMatcher
- DatastoreMatcher
- FieldMatcher
- ScraperWiki::API::Matchers::HaveIntegerValues
- Defined in:
- lib/scraperwiki-api/matchers.rb
Instance Method Summary collapse
Methods inherited from FieldMatcher
#at, #blank?, #failure_description, #in, #matcher, #matches, #mismatches, #negative_failure_description
Methods inherited from DatastoreMatcher
#does_not_match?, #failure_description, #failure_message, #failure_size, #failures, #items, #matches, #matches?, #mismatches, #negative_failure_description, #negative_failure_message
Methods inherited from CustomMatcher
#does_not_match?, #failure_message, #initialize, #matches?, #negative_failure_message
Constructor Details
This class inherits a constructor from ScraperWiki::API::Matchers::CustomMatcher
Instance Method Details
#failure_predicate ⇒ Object
693 694 695 |
# File 'lib/scraperwiki-api/matchers.rb', line 693 def failure_predicate "aren't integers" end |
#match?(v) ⇒ Boolean
689 690 691 |
# File 'lib/scraperwiki-api/matchers.rb', line 689 def match?(v) Integer(v) rescue false end |
#negative_failure_predicate ⇒ Object
697 698 699 |
# File 'lib/scraperwiki-api/matchers.rb', line 697 def negative_failure_predicate 'are integers' end |