Class: Sbmt::Pact::Matchers::V2::Type
- Defined in:
- lib/sbmt/pact/matchers/v2/type.rb
Instance Attribute Summary
Attributes inherited from Base
#kind, #opts, #spec_version, #template
Instance Method Summary collapse
-
#initialize(template) ⇒ Type
constructor
A new instance of Type.
Methods inherited from Base
Constructor Details
#initialize(template) ⇒ Type
Returns a new instance of Type.
8 9 10 11 12 |
# File 'lib/sbmt/pact/matchers/v2/type.rb', line 8 def initialize(template) raise MatcherInitializationError, "#{self.class}: template is not a primitive" unless template.is_a?(TrueClass) || template.is_a?(FalseClass) || template.is_a?(Numeric) || template.is_a?(String) super(spec_version: Sbmt::Pact::Matchers::PACT_SPEC_V2, kind: "type", template: template) end |