module TokyoMetro::Api::StationTimetable::Info::TrainTime::Info::Note::YurakuchoFukusohin::TrainType::TokyuToyoko
東急東横線の乗り入れに関する情報を扱うクラス
Public Class Methods
set_from_string( str )
click to toggle source
与えられた文字列(種別)をもとにインスタンスを作成するメソッド @param str [String] 種別を示す文字列 @return [subclasses of Fundamental]
# File lib/tokyo_metro/api/station_timetable/info/train_time/info/note/yurakucho_fukutoshin/train_type/tokyu_toyoko.rb, line 7 def self.set_from_string( str ) case str when "各駅" Local.instance when "急行" Express.instance when "通勤特急" CommuterLimitedExpress.instance when "特急" LimitedExpress.instance else raise "Error" end end