Class: Ekispert::Course::Route::Point
- Inherits:
-
EkispertBase
- Object
- EkispertBase
- Ekispert::Course::Route::Point
- Defined in:
- lib/ekispert/course/route/point.rb,
lib/ekispert/course/route/point/station.rb,
lib/ekispert/course/route/point/prefecture.rb
Direct Known Subclasses
Defined Under Namespace
Classes: GeoPoint, Name, Prefecture, Station
Instance Attribute Summary collapse
-
#geo_point_list ⇒ Object
Returns the value of attribute geo_point_list.
-
#name_list ⇒ Object
Returns the value of attribute name_list.
-
#prefecture_list ⇒ Object
Returns the value of attribute prefecture_list.
-
#station_list ⇒ Object
Returns the value of attribute station_list.
Instance Method Summary collapse
- #geo_point ⇒ Object
-
#initialize(element) ⇒ Point
constructor
A new instance of Point.
- #name ⇒ Object
- #prefecture ⇒ Object
- #station ⇒ Object
- #station? ⇒ Boolean
Methods included from Util
Constructor Details
#initialize(element) ⇒ Point
Returns a new instance of Point.
8 9 10 11 12 13 14 15 |
# File 'lib/ekispert/course/route/point.rb', line 8 def initialize(element) @station_list = [] @prefecture_list = [] @geo_point_list = [] @name_list = [] super(element) set_station_instance_variables if station? end |
Instance Attribute Details
#geo_point_list ⇒ Object
Returns the value of attribute geo_point_list.
5 6 7 |
# File 'lib/ekispert/course/route/point.rb', line 5 def geo_point_list @geo_point_list end |
#name_list ⇒ Object
Returns the value of attribute name_list.
6 7 8 |
# File 'lib/ekispert/course/route/point.rb', line 6 def name_list @name_list end |
#prefecture_list ⇒ Object
Returns the value of attribute prefecture_list.
5 6 7 |
# File 'lib/ekispert/course/route/point.rb', line 5 def prefecture_list @prefecture_list end |
#station_list ⇒ Object
Returns the value of attribute station_list.
5 6 7 |
# File 'lib/ekispert/course/route/point.rb', line 5 def station_list @station_list end |
Instance Method Details
#geo_point ⇒ Object
25 26 27 |
# File 'lib/ekispert/course/route/point.rb', line 25 def geo_point @geo_point_list[0] end |
#name ⇒ Object
29 30 31 |
# File 'lib/ekispert/course/route/point.rb', line 29 def name @name_list[0]&.text end |
#prefecture ⇒ Object
21 22 23 |
# File 'lib/ekispert/course/route/point.rb', line 21 def prefecture @prefecture_list[0] end |
#station ⇒ Object
17 18 19 |
# File 'lib/ekispert/course/route/point.rb', line 17 def station @station_list[0] end |