Class: ScraperWiki::API::Matchers::HaveValuesEndingWith

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



717
718
719
# File 'lib/scraperwiki-api/matchers.rb', line 717

def failure_predicate
  "don't end with #{@expected}"
end

#match?(v) ⇒ Boolean

Returns:

  • (Boolean)


713
714
715
# File 'lib/scraperwiki-api/matchers.rb', line 713

def match?(v)
  v.end_with? @expected
end

#negative_failure_predicateObject



721
722
723
# File 'lib/scraperwiki-api/matchers.rb', line 721

def negative_failure_predicate
  "end with #{@expected}"
end