Class: ScraperWiki::API::Matchers::HaveValuesStartingWith

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



698
699
700
# File 'lib/scraperwiki-api/matchers.rb', line 698

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

#match?(v) ⇒ Boolean

Returns:

  • (Boolean)


694
695
696
# File 'lib/scraperwiki-api/matchers.rb', line 694

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

#negative_failure_predicateObject



702
703
704
# File 'lib/scraperwiki-api/matchers.rb', line 702

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