Class: TokyoMetro::App::Renderer::SideMenu::Link::ToOtherWebsite

Inherits:
MetaClass show all
Defined in:
lib/tokyo_metro/app/renderer/side_menu/link/to_other_website.rb

Constant Summary

Constants inherited from Concerns::Link::Normal::MetaClass

Concerns::Link::Normal::MetaClass::ICON_SIZE

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Concerns::Link::Normal::MetaClass

#render

Constructor Details

#initialize(request, title_ja, title_en, url, icon_name: nil) ⇒ ToOtherWebsite

Returns a new instance of ToOtherWebsite.



3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/tokyo_metro/app/renderer/side_menu/link/to_other_website.rb', line 3

def initialize( request , title_ja , title_en , url , icon_name: nil )
  super(
    request ,
    title_ja ,
    title_en ,
    url ,
    icon_name: icon_name ,
    class_name_of_link: :link ,
    class_name_of_div_domain: :link_to_other_website ,
    open_another_window: true ,
    size: :small ,
    link_to_another_website: true
  )
end

Class Method Details

.tokyo_metro_official(request) ⇒ Object



18
19
20
21
22
23
24
25
26
# File 'lib/tokyo_metro/app/renderer/side_menu/link/to_other_website.rb', line 18

def self.tokyo_metro_official( request )
  self.new(
    request ,
    "東京メトロ[公式]" ,
    "Tokyo Metro Official Page" ,
    "http://www.tokyometro.jp/index.html" ,
    icon_name: :tokyo_metro
  )
end

.top_for_developer(request) ⇒ Object



38
39
40
41
42
43
44
45
46
# File 'lib/tokyo_metro/app/renderer/side_menu/link/to_other_website.rb', line 38

def self.top_for_developer( request )
  self.new(
    request ,
    [ "オープンデータ" , "開発者サイト" ] ,
    "Developers' page" ,
    "https://developer.tokyometroapp.jp/" ,
    icon_name: :development
  )
end

.top_of_opendata_contest(request) ⇒ Object



28
29
30
31
32
33
34
35
36
# File 'lib/tokyo_metro/app/renderer/side_menu/link/to_other_website.rb', line 28

def self.top_of_opendata_contest( request )
  self.new(
    request ,
    [ "オープンデータ" , "活用コンテスト" ] ,
    "Open Data Competition" ,
    "http://tokyometro10th.jp/future/opendata/index.html" ,
    icon_name: :contest
  )
end