Class: ScraperWiki::API::Matchers::HaveValuesMatching

Inherits:
FieldMatcher show all
Defined in:
lib/scraperwiki-api/matchers.rb

Instance Method Summary collapse

Constructor Details

This class inherits a constructor from ScraperWiki::API::Matchers::CustomMatcher

Instance Method Details

#failure_predicateObject



629
630
631
# File 'lib/scraperwiki-api/matchers.rb', line 629

def failure_predicate
  "don't match #{@expected.inspect}"
end

#match?(v) ⇒ Boolean

Returns:

  • (Boolean)


625
626
627
# File 'lib/scraperwiki-api/matchers.rb', line 625

def match?(v)
  v[@expected]
end

#negative_failure_predicateObject



633
634
635
# File 'lib/scraperwiki-api/matchers.rb', line 633

def negative_failure_predicate
  "match #{@expected.inspect}"
end