Class: Cuprum::Collections::Constraints::AttributeName

Inherits:
Stannum::Constraints::Hashes::IndifferentKey
  • Object
show all
Defined in:
lib/cuprum/collections/constraints/attribute_name.rb

Overview

Asserts that the object is a non-empty String or Symbol.

Constant Summary collapse

NEGATED_TYPE =

The :type of the error generated for a matching object.

'cuprum.collections.constraints.is_valid_attribute_name'
TYPE =

The :type of the error generated for a non-matching object.

'cuprum.collections.constraints.is_not_valid_attribute_name'

Class Method Summary collapse

Class Method Details

.instanceCuprum::Collections::Constraints::AttributeName

Returns a cached instance of the constraint with default options.

Returns:



18
19
20
# File 'lib/cuprum/collections/constraints/attribute_name.rb', line 18

def self.instance
  @instance ||= new
end