Class: Sbmt::Pact::Matchers::V3::Boolean

Inherits:
Base
  • Object
show all
Defined in:
lib/sbmt/pact/matchers/v3/boolean.rb

Instance Attribute Summary

Attributes inherited from Base

#kind, #opts, #spec_version, #template

Instance Method Summary collapse

Methods inherited from Base

#as_basic, #as_plugin

Constructor Details

#initialize(template) ⇒ Boolean

Returns a new instance of Boolean.



8
9
10
11
12
# File 'lib/sbmt/pact/matchers/v3/boolean.rb', line 8

def initialize(template)
  raise MatcherInitializationError, "#{self.class}: #{template} should be an instance of Boolean" unless template.is_a?(TrueClass) || template.is_a?(FalseClass)

  super(spec_version: Sbmt::Pact::Matchers::PACT_SPEC_V3, kind: "boolean", template: template)
end