Class: Cuprum::Collections::Constraints::QueryHash

Inherits:
Stannum::Constraints::Types::HashType
  • Object
show all
Defined in:
lib/cuprum/collections/constraints/query_hash.rb

Overview

Asserts that the object is a Hash with valid attribute name keys.

Instance Method Summary collapse

Constructor Details

#initialize(**options) ⇒ QueryHash

Returns a new instance of QueryHash.



11
12
13
14
15
16
17
# File 'lib/cuprum/collections/constraints/query_hash.rb', line 11

def initialize(**options)
  super(
    allow_empty: true,
    key_type:    attribute_name_constraint,
    **options
  )
end