Class: Ekispert::Point::Station

Inherits:
Ekispert::Point show all
Defined in:
lib/ekispert/point/station.rb,
lib/ekispert/point/station/gate_group.rb,
lib/ekispert/point/station/gate_group/gate.rb

Defined Under Namespace

Classes: GateGroup, Name, OldName, Type, Yomi

Instance Attribute Summary collapse

Attributes inherited from Ekispert::Point

#geo_point_list, #prefecture_list, #station_list

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Ekispert::Point

#geo_point, get_station, get_station_light, #prefecture, #station

Methods included from Util

#snakecase

Constructor Details

#initialize(element) ⇒ Station

Returns a new instance of Station.



6
7
8
9
10
11
12
13
14
15
# File 'lib/ekispert/point/station.rb', line 6

def initialize(element)
  @name_list = []
  @yomi_list = []
  @type_list = []
  # when use addGateGroup param
  @gate_group_list = []
  # when use oldName param
  @old_name_list = []
  super(element)
end

Instance Attribute Details

#gate_group_listObject (readonly)

Returns the value of attribute gate_group_list.



4
5
6
# File 'lib/ekispert/point/station.rb', line 4

def gate_group_list
  @gate_group_list
end

#name_listObject (readonly)

Returns the value of attribute name_list.



4
5
6
# File 'lib/ekispert/point/station.rb', line 4

def name_list
  @name_list
end

#old_name_listObject (readonly)

Returns the value of attribute old_name_list.



4
5
6
# File 'lib/ekispert/point/station.rb', line 4

def old_name_list
  @old_name_list
end

#type_listObject (readonly)

Returns the value of attribute type_list.



4
5
6
# File 'lib/ekispert/point/station.rb', line 4

def type_list
  @type_list
end

#yomi_listObject (readonly)

Returns the value of attribute yomi_list.



4
5
6
# File 'lib/ekispert/point/station.rb', line 4

def yomi_list
  @yomi_list
end

Class Method Details

.get(params = {}) ⇒ Object



37
38
39
# File 'lib/ekispert/point/station.rb', line 37

def self.get(params={})
  convert_point_to_station(self.superclass.get_station(params))
end

Instance Method Details

#gate_groupObject



29
30
31
# File 'lib/ekispert/point/station.rb', line 29

def gate_group
  @gate_group_list[0]
end

#nameObject



17
18
19
# File 'lib/ekispert/point/station.rb', line 17

def name
  @name_list[0].text
end

#old_nameObject



33
34
35
# File 'lib/ekispert/point/station.rb', line 33

def old_name
  @old_name_list[0]&.text
end

#typeObject



25
26
27
# File 'lib/ekispert/point/station.rb', line 25

def type
  @type_list[0].text
end

#yomiObject



21
22
23
# File 'lib/ekispert/point/station.rb', line 21

def yomi
  @yomi_list[0].text
end