Exception: Holotype::CollectionNormalizer::ExpectedArrayLikeCollectionError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attribute) ⇒ ExpectedArrayLikeCollectionError

Returns a new instance of ExpectedArrayLikeCollectionError.



6
7
8
# File 'lib/holotype/collection_normalizer/expected_array_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_array_like_collection_error.rb', line 4

def attribute
  @attribute
end

Instance Method Details

#messageObject



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

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