Exception: Holotype::CollectionNormalizer::ExpectedHashLikeCollectionError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/holotype/collection_normalizer/expected_hash_like_collection_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attribute) ⇒ ExpectedHashLikeCollectionError

Returns a new instance of ExpectedHashLikeCollectionError.



6
7
8
# File 'lib/holotype/collection_normalizer/expected_hash_like_collection_error.rb', line 6

def initialize attribute
  @attribute = attribute
end

Instance Attribute Details

#attributeObject (readonly)

Returns the value of attribute attribute.



4
5
6
# File 'lib/holotype/collection_normalizer/expected_hash_like_collection_error.rb', line 4

def attribute
  @attribute
end

Instance Method Details

#messageObject



10
11
12
13
# File 'lib/holotype/collection_normalizer/expected_hash_like_collection_error.rb', line 10

def message
  "Attribute `#{attribute}` expected Hash-like collection, received " \
  "Array-like collection".freeze
end