Class: ParamsReady::Marshaller::ArrayMarshallers

Inherits:
Object
  • Object
show all
Defined in:
lib/params_ready/marshaller/array_marshallers.rb

Defined Under Namespace

Modules: AbstractMarshaller, ArrayMarshaller, StructMarshaller Classes: StringMarshaller

Class Method Summary collapse

Class Method Details

.collectionObject



120
121
122
123
124
125
126
127
128
129
130
# File 'lib/params_ready/marshaller/array_marshallers.rb', line 120

def self.collection
  @collection ||= begin
    c = ClassCollection.new Array
    c.add_instance Array, ArrayMarshaller
    c.add_instance Hash, StructMarshaller
    c.add_factory :string, StringMarshaller
    c.default!(Hash)
    c.freeze
    c
  end
end