Class: Pact::Matchers::V3::Decimal
- Defined in:
- lib/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.
7 8 9 10 11 12 13 14 |
# File 'lib/pact/matchers/v3/decimal.rb', line 7 def initialize(template) unless template.is_a?(Float) raise MatcherInitializationError, "#{self.class}: #{template} should be an instance of Float" end super(spec_version: Pact::Matchers::PACT_SPEC_V3, kind: 'decimal', template: template) end |