Module: MITS::V3_0::Mapper::AddressMapper
- Included in:
- MITS::V3_0::Mapper, MITS::V4_1::Mapper::AddressMapper
- Defined in:
- lib/mits/v3.0/mapper/address_mapper.rb
Instance Method Summary collapse
Instance Method Details
#address(tag, secondary_tag = nil, entity = Address) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/mits/v3.0/mapper/address_mapper.rb', line 5 def address(tag, secondary_tag = nil, entity = Address) attrs = address_attributes(tag) if secondary_tag attrs[:latitude] = try(secondary_tag[:Latitude], :to_f) attrs[:longitude] = try(secondary_tag[:Longitude], :to_f) end entity.new(attrs) end |