Class: Stannum::Contracts::Parameters::SignatureContract

Inherits:
HashContract show all
Defined in:
lib/stannum/contracts/parameters/signature_contract.rb

Overview

A SignatureContract defines a parameters object for a ParametersContract.

Constant Summary

Constants inherited from Stannum::Constraints::Base

Stannum::Constraints::Base::NEGATED_TYPE, Stannum::Constraints::Base::TYPE

Instance Attribute Summary

Attributes inherited from Stannum::Constraints::Base

#options

Instance Method Summary collapse

Methods inherited from HashContract

#key_type, #value_type

Methods inherited from MapContract

#add_key_constraint, #allow_extra_keys?, #expected_keys, #with_options

Methods inherited from Stannum::Contract

#add_constraint, #add_property_constraint

Methods inherited from Base

#==, #add_constraint, #concat, #does_not_match?, #each_constraint, #each_pair, #errors_for, #match, #matches?, #negated_errors_for, #negated_match

Methods inherited from Stannum::Constraints::Base

#==, #clone, #does_not_match?, #dup, #errors_for, #match, #matches?, #message, #negated_errors_for, #negated_match, #negated_message, #negated_type, #type, #with_options

Constructor Details

#initialize(**options) ⇒ SignatureContract

Returns a new instance of SignatureContract.

Parameters:

  • options (Hash<Symbol, Object>)

    Configuration options for the contract. Defaults to an empty Hash.



10
11
12
# File 'lib/stannum/contracts/parameters/signature_contract.rb', line 10

def initialize(**options)
  super(key_type: Symbol, **options)
end