Module: TokyoMetro::Modules::Common::Info::StationFacility::BarrierFree::MobilityScooter::MethodMissing
- Included in:
- Api::StationFacility::Info::BarrierFree::Facility::Escalator::Info, Api::StationFacility::Info::BarrierFree::Facility::MetaClass::LinkForMobilityScooterAndStairlift::Info
- Defined in:
- lib/tokyo_metro/modules/common/info/station_facility/barrier_free/mobility_scooter/method_missing.rb
Instance Method Summary collapse
- #available_to_mobility_scooter? ⇒ Boolean
- #method_missing(method_name, *args) ⇒ Object
- #mobility_scooter_accessible? ⇒ Boolean
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/tokyo_metro/modules/common/info/station_facility/barrier_free/mobility_scooter/method_missing.rb', line 15 def method_missing( method_name , *args ) if args.empty? and /mobility_scooter/ === method_name.to_s case method_name.to_s when /\A(?:(?:is_)?for_)?mobility_scooter(?:s)?(?:\?)?\Z/ return mobility_scooter_accessible? when /\A(?:is_)?mobility_scooter(?:s)?_accessible(?:\?)?\Z/ return mobility_scooter_accessible? when /\A(?:is_)?available_(?:to|for)_mobility_scooter(?:s)?(?:\?)?\Z/ return available_to_mobility_scooter? end end super end |
Instance Method Details
#available_to_mobility_scooter? ⇒ Boolean
Note:
is_available_to_mobility_scooter の別名として、available_to_mobility_scooter? を定義
11 12 13 |
# File 'lib/tokyo_metro/modules/common/info/station_facility/barrier_free/mobility_scooter/method_missing.rb', line 11 def available_to_mobility_scooter? is_available_to_mobility_scooter end |
#mobility_scooter_accessible? ⇒ Boolean
Note:
mobility_scooter_accessible の別名として、mobility_scooter_accessible? を定義
6 7 8 |
# File 'lib/tokyo_metro/modules/common/info/station_facility/barrier_free/mobility_scooter/method_missing.rb', line 6 def mobility_scooter_accessible? mobility_scooter_accessible end |