Class: Osmer::Mapper::Address

Inherits:
Base
  • Object
show all
Defined in:
lib/osmer/mapper/address.rb

Instance Attribute Summary

Attributes inherited from Base

#name, #table

Instance Method Summary collapse

Methods inherited from Base

#conditions, #indexes, #initialize

Constructor Details

This class inherits a constructor from Osmer::Mapper::Base

Instance Method Details

#assignsObject



5
6
7
8
9
10
# File 'lib/osmer/mapper/address.rb', line 5

def assigns
  { :street => "src_tags->'addr:street'",
    :housenumber => "src_tags->'addr:housenumber'",
    :city => "src_tags->'addr:city'",
    :postcode => "src_tags->'addr:postcode'" }
end

#fieldsObject



12
13
14
15
16
17
# File 'lib/osmer/mapper/address.rb', line 12

def fields
  { :street => "TEXT",
    :housenumber => 'TEXT',
    :city => "TEXT",
    :postcode => "TEXT" }
end