Class: Sbmt::Pact::Matchers::V3::Decimal

Inherits:
Base
  • Object
show all
Defined in:
lib/sbmt/pact/matchers/v3/decimal.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) ⇒ Decimal

Returns a new instance of Decimal.



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

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

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