Class: Sbmt::Pact::Matchers::V3::Decimal
- 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
-
#initialize(template) ⇒ Decimal
constructor
A new instance of Decimal.
Methods inherited from Base
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 |