Class: ApiMapper::HashMapper
Class Method Summary
collapse
Methods inherited from Mapper
attributes, #call, entity, relationship, transformation
Class Method Details
.factory ⇒ Object
54
55
56
|
# File 'lib/api_mapper/mapper.rb', line 54
def self.factory
t(:map_array, super)
end
|
.mapping ⇒ Object
49
50
51
52
|
# File 'lib/api_mapper/mapper.rb', line 49
def self.mapping
raise "Only one key, pair allowed" if @attributes.count > 1
@map = t(:structure, @attributes.first.keys.first, @attributes.first.values.first)
end
|