Module: TokyoMetro::Modules::Common::Info::NewAndOldRailwayLine
- Included in:
- Api::ToFactory::Convert::Customize::Station::ConnectingRailwayLine::Info::ConnectingRailwayLine::Info, Static::RailwayLine::Info
- Defined in:
- lib/tokyo_metro/modules/common/info/new_and_old_railway_line.rb
Defined Under Namespace
Modules: SetTime
Instance Method Summary collapse
- #already_ended? ⇒ Boolean
- #already_operated? ⇒ Boolean
- #ended_already? ⇒ Boolean
- #not_ended_yet? ⇒ Boolean
- #not_operated_now? ⇒ Boolean
- #not_operated_yet? ⇒ Boolean
- #operated_already? ⇒ Boolean
Instance Method Details
#already_ended? ⇒ Boolean
19 20 21 |
# File 'lib/tokyo_metro/modules/common/info/new_and_old_railway_line.rb', line 19 def already_ended? ended_already? end |
#already_operated? ⇒ Boolean
11 12 13 |
# File 'lib/tokyo_metro/modules/common/info/new_and_old_railway_line.rb', line 11 def already_operated? operated_already? end |
#ended_already? ⇒ Boolean
15 16 17 |
# File 'lib/tokyo_metro/modules/common/info/new_and_old_railway_line.rb', line 15 def ended_already? end_on.present? and ::Time.now > end_on end |
#not_ended_yet? ⇒ Boolean
23 24 25 |
# File 'lib/tokyo_metro/modules/common/info/new_and_old_railway_line.rb', line 23 def not_ended_yet? !( ended_already? ) end |
#not_operated_now? ⇒ Boolean
27 28 29 |
# File 'lib/tokyo_metro/modules/common/info/new_and_old_railway_line.rb', line 27 def not_operated_now? !( not_operated_yet? or ended_already? ) end |
#not_operated_yet? ⇒ Boolean
3 4 5 |
# File 'lib/tokyo_metro/modules/common/info/new_and_old_railway_line.rb', line 3 def not_operated_yet? start_on.present? and ::Time.now < start_on end |
#operated_already? ⇒ Boolean
7 8 9 |
# File 'lib/tokyo_metro/modules/common/info/new_and_old_railway_line.rb', line 7 def operated_already? !( not_operated_yet? ) end |