Class: ODDB::Html::View::CountryLinks

Inherits:
Links
  • Object
show all
Defined in:
lib/oddb/html/view/navigation.rb

Instance Method Summary collapse

Methods inherited from Links

#init, #links

Instance Method Details



28
29
30
31
32
33
# File 'lib/oddb/html/view/navigation.rb', line 28

def link_keys
  country, = @session.server_name.split('.')
  ptrn = /_#{country}$/
  [:oddb_ch, :oddb_de, :oddb_chde].reject { |key| 
    ptrn.match(key.to_s) }
end

#oddb_ch(link) ⇒ Object



34
35
36
# File 'lib/oddb/html/view/navigation.rb', line 34

def oddb_ch(link)
  link.href = "http://ch.oddb.org/de/"
end

#oddb_chde(link) ⇒ Object



37
38
39
# File 'lib/oddb/html/view/navigation.rb', line 37

def oddb_chde(link)
  link.href = "http://chde.oddb.org/"
end

#oddb_de(link) ⇒ Object



40
41
42
# File 'lib/oddb/html/view/navigation.rb', line 40

def oddb_de(link)
  link.href = "http://de.oddb.org/"
end