Class: Pact::V2::Matchers::V4::NotEmpty
- Defined in:
- lib/pact/v2/matchers/v4/not_empty.rb
Instance Attribute Summary
Attributes inherited from Base
#kind, #opts, #spec_version, #template
Instance Method Summary collapse
- #as_plugin ⇒ Object
-
#initialize(template = nil) ⇒ NotEmpty
constructor
A new instance of NotEmpty.
Methods inherited from Base
Constructor Details
#initialize(template = nil) ⇒ NotEmpty
Returns a new instance of NotEmpty.
8 9 10 11 |
# File 'lib/pact/v2/matchers/v4/not_empty.rb', line 8 def initialize(template = nil) @template = template super(spec_version: Pact::V2::Matchers::PACT_SPEC_V4, kind: 'notEmpty', template: @template) end |
Instance Method Details
#as_plugin ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/pact/v2/matchers/v4/not_empty.rb', line 13 def as_plugin if @template.nil? || @template.blank? raise MatcherInitializationError, "#{self.class}: template must be provided when calling as_plugin" end "notEmpty('#{@template}')" end |