Class: Sbmt::Pact::Matchers::V3::DateTime
- Defined in:
- lib/sbmt/pact/matchers/v3/date_time.rb
Instance Attribute Summary
Attributes inherited from Base
#kind, #opts, #spec_version, #template
Instance Method Summary collapse
-
#initialize(format, template) ⇒ DateTime
constructor
A new instance of DateTime.
Methods inherited from Base
Constructor Details
#initialize(format, template) ⇒ DateTime
Returns a new instance of DateTime.
8 9 10 11 12 13 |
# File 'lib/sbmt/pact/matchers/v3/date_time.rb', line 8 def initialize(format, template) raise MatcherInitializationError, "#{self.class}: #{format} should be an instance of String" unless template.is_a?(String) raise MatcherInitializationError, "#{self.class}: #{template} should be an instance of String" unless template.is_a?(String) super(spec_version: Sbmt::Pact::Matchers::PACT_SPEC_V3, kind: "datetime", template: template, opts: {format: format}) end |