Module: ODDB::View::AddressMap

Included in:
Doctors::DoctorList, Hospitals::HospitalInnerComposite, Hospitals::HospitalList, SuggestedAddress
Defined in:
src/view/address.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) map(address)



10
11
12
13
14
15
16
17
18
19
# File 'src/view/address.rb', line 10

def map(address)
  link = HtmlGrid::Link.new(:map, address, @session, self)
  link.href = [
    'http://map.search.ch', 
    mapsearch_format(address.plz, address.city),
    mapsearch_format(address.street, address.number),
  ].join('/')
  link.css_class = 'list'
  link
end

- (Object) mapsearch_format(*args)



20
21
22
# File 'src/view/address.rb', line 20

def mapsearch_format(*args)
  args.compact.join('-').gsub(/\s+/u, '-')
end