class TokyoMetro::Static::TrainType::Custom::OtherOperator::Info
個別の列車種別の情報(他社)を扱うクラス
Attributes
bgcolor[R]
@return [::TokyoMetro::Static::TrainType::Color::Info or::TokyoMetro::Static::Color::Info] 背景色の情報(インスタンス変数) @example
TokyoMetro::Static.train_types_other_operator.each_value { | train_type | puts train_type.same_as.ljust(48) + " " + train_type.bgcolor.class.name } => custom.TrainType:Odakyu.Local TokyoMetro::Static::Color custom.TrainType:Odakyu.SemiExpress TokyoMetro::Static::Color custom.TrainType:Odakyu.TamaExpress TokyoMetro::Static::Color custom.TrainType:Odakyu.RomanceCar TokyoMetro::Static::Color custom.TrainType:Seibu.Local TokyoMetro::Static::TrainType::Color::Info custom.TrainType:Seibu.SemiExpress TokyoMetro::Static::Color custom.TrainType:Seibu.Rapid TokyoMetro::Static::Color custom.TrainType:Seibu.RapidExpress TokyoMetro::Static::Color custom.TrainType:Tobu.SemiExpress TokyoMetro::Static::Color custom.TrainType:Tobu.Express TokyoMetro::Static::Color custom.TrainType:TobuTojo.Local TokyoMetro::Static::TrainType::Color::Info custom.TrainType:Tokyu.Local TokyoMetro::Static::Color custom.TrainType:Tokyu.Meguro.Local TokyoMetro::Static::Color custom.TrainType:Tokyu.SemiExpress TokyoMetro::Static::Color custom.TrainType:Tokyu.Express TokyoMetro::Static::Color custom.TrainType:Tokyu.HolidayExpress TokyoMetro::Static::TrainType::Color::Info custom.TrainType:Tokyu.CommuterLimitedExpress TokyoMetro::Static::Color custom.TrainType:Tokyu.LimitedExpress TokyoMetro::Static::Color custom.TrainType:ToyoRapidRailway.ToyoRapid TokyoMetro::Static::Color
color[R]
@return [::TokyoMetro::Static::TrainType::Color::Info or::TokyoMetro::Static::Color::Info] 文字色の情報(インスタンス変数) @example
TokyoMetro::Static.train_types_other_operator.each_value { | train_type | puts train_type.same_as.ljust(48) + " " + train_type.color.class.name } => custom.TrainType:Odakyu.Local TokyoMetro::Static::TrainType::Color::Info custom.TrainType:Odakyu.SemiExpress TokyoMetro::Static::TrainType::Color::Info custom.TrainType:Odakyu.TamaExpress TokyoMetro::Static::TrainType::Color::Info custom.TrainType:Odakyu.RomanceCar TokyoMetro::Static::TrainType::Color::Info custom.TrainType:Seibu.Local TokyoMetro::Static::TrainType::Color::Info custom.TrainType:Seibu.SemiExpress TokyoMetro::Static::TrainType::Color::Info custom.TrainType:Seibu.Rapid TokyoMetro::Static::TrainType::Color::Info custom.TrainType:Seibu.RapidExpress TokyoMetro::Static::TrainType::Color::Info custom.TrainType:Tobu.SemiExpress TokyoMetro::Static::TrainType::Color::Info custom.TrainType:Tobu.Express TokyoMetro::Static::TrainType::Color::Info custom.TrainType:TobuTojo.Local TokyoMetro::Static::TrainType::Color::Info custom.TrainType:Tokyu.Local TokyoMetro::Static::TrainType::Color::Info custom.TrainType:Tokyu.Meguro.Local TokyoMetro::Static::TrainType::Color::Info custom.TrainType:Tokyu.SemiExpress TokyoMetro::Static::TrainType::Color::Info custom.TrainType:Tokyu.Express TokyoMetro::Static::TrainType::Color::Info custom.TrainType:Tokyu.HolidayExpress TokyoMetro::Static::TrainType::Color::Info custom.TrainType:Tokyu.CommuterLimitedExpress TokyoMetro::Static::TrainType::Color::Info custom.TrainType:Tokyu.LimitedExpress TokyoMetro::Static::TrainType::Color::Info custom.TrainType:ToyoRapidRailway.ToyoRapid TokyoMetro::Static::TrainType::Color::Info
operator[R]
railway_line[R]
same_as[R]
@return [String] 種別の ID(インスタンス変数) @example
TokyoMetro::Static.train_types_other_operator.each_value { | train_type | puts train_type.same_as } => custom.TrainType:Odakyu.Local custom.TrainType:Odakyu.SemiExpress custom.TrainType:Odakyu.TamaExpress custom.TrainType:Odakyu.RomanceCar custom.TrainType:Seibu.Local custom.TrainType:Seibu.SemiExpress custom.TrainType:Seibu.Rapid custom.TrainType:Seibu.RapidExpress custom.TrainType:Tobu.SemiExpress custom.TrainType:Tobu.Express custom.TrainType:TobuTojo.Local custom.TrainType:Tokyu.Local custom.TrainType:Tokyu.Meguro.Local custom.TrainType:Tokyu.SemiExpress custom.TrainType:Tokyu.Express custom.TrainType:Tokyu.HolidayExpress custom.TrainType:Tokyu.CommuterLimitedExpress custom.TrainType:Tokyu.LimitedExpress custom.TrainType:ToyoRapidRailway.ToyoRapid
train_type[R]
@return [TokyoMetro::Static::TrainType::InApi::Info] API 内部の種別情報(インスタンス変数) @example
TokyoMetro::Static.train_types_other_operator.each_value { | train_type | puts train_type.same_as.ljust(48) + " " + train_type.train_type.class.name } => custom.TrainType:Odakyu.Local TokyoMetro::Static::TrainType::InApi::Info custom.TrainType:Odakyu.SemiExpress TokyoMetro::Static::TrainType::InApi::Info ...... custom.TrainType:Tokyu.CommuterLimitedExpress TokyoMetro::Static::TrainType::InApi::Info custom.TrainType:Tokyu.LimitedExpress TokyoMetro::Static::TrainType::InApi::Info custom.TrainType:ToyoRapidRailway.ToyoRapid TokyoMetro::Static::TrainType::InApi::Info
Public Class Methods
new( same_as , train_type , bgcolor , color , operator , railway_line )
click to toggle source
Constructor @param same_as
[String] 作成するインスタンスの ID キー
# File lib/tokyo_metro/static/train_type/custom/other_operator/info.rb, line 11 def initialize( same_as , train_type , bgcolor , color , operator , railway_line ) @same_as = same_as @train_type = train_type @bgcolor = bgcolor @color = color @operator = operator @railway_line = railway_line end
Public Instance Methods
<=>( other )
click to toggle source
インスタンスの比較に用いるメソッド @return [Integer]
# File lib/tokyo_metro/static/train_type/custom/other_operator/info.rb, line 120 def <=>( other ) @same_as <=> other.same_as end
name_en()
click to toggle source
種別の名称(ローマ字表記、正式名称) @return [String] @example
TokyoMetro::Static.train_types_other_operator.each_value { | train_type | puts train_type.same_as.ljust(48) + " " + train_type.name_en } => custom.TrainType:Odakyu.Local Local custom.TrainType:Odakyu.SemiExpress Semi Express custom.TrainType:Odakyu.TamaExpress Tama Express custom.TrainType:Odakyu.RomanceCar Romance Car (Limited Express) custom.TrainType:Seibu.Local Local custom.TrainType:Seibu.SemiExpress Semi Express custom.TrainType:Seibu.Rapid Rapid custom.TrainType:Seibu.RapidExpress Rapid Express custom.TrainType:Tobu.SemiExpress Semi Express custom.TrainType:Tobu.Express Express custom.TrainType:TobuTojo.Local Local custom.TrainType:Tokyu.Local Local custom.TrainType:Tokyu.Meguro.Local Local custom.TrainType:Tokyu.SemiExpress Semi Express custom.TrainType:Tokyu.Express Express custom.TrainType:Tokyu.HolidayExpress Express (Holiday) custom.TrainType:Tokyu.CommuterLimitedExpress Commuter Limited Express custom.TrainType:Tokyu.LimitedExpress Limited Express custom.TrainType:ToyoRapidRailway.ToyoRapid Toyo Rapid
# File lib/tokyo_metro/static/train_type/custom/other_operator/info.rb, line 193 def name_en @train_type.name_en end
name_en_normal()
click to toggle source
種別の名称(ローマ字、標準) @return [String] @note name_en_display については特に定義しない。 @example
TokyoMetro::Static.train_types_other_operator.each_value { | train_type | puts train_type.same_as.ljust(48) + " " + train_type.name_en_normal } => custom.TrainType:Odakyu.Local Local custom.TrainType:Odakyu.SemiExpress Semi Express custom.TrainType:Odakyu.TamaExpress Tama Express custom.TrainType:Odakyu.RomanceCar Limited Express "Romance Car" custom.TrainType:Seibu.Local Local custom.TrainType:Seibu.SemiExpress Semi Express custom.TrainType:Seibu.Rapid Rapid custom.TrainType:Seibu.RapidExpress Rapid Express custom.TrainType:Tobu.SemiExpress Semi Express custom.TrainType:Tobu.Express Express custom.TrainType:TobuTojo.Local Local custom.TrainType:Tokyu.Local Local custom.TrainType:Tokyu.Meguro.Local Local custom.TrainType:Tokyu.SemiExpress Semi Express custom.TrainType:Tokyu.Express Express custom.TrainType:Tokyu.HolidayExpress Express custom.TrainType:Tokyu.CommuterLimitedExpress Commuter Limited Express custom.TrainType:Tokyu.LimitedExpress Limited Express custom.TrainType:ToyoRapidRailway.ToyoRapid Toyo Rapid
# File lib/tokyo_metro/static/train_type/custom/other_operator/info.rb, line 253 def name_en_normal @train_type.name_en_normal end
name_ja()
click to toggle source
種別の名称(日本語、正式名称) @return [String] @example
TokyoMetro::Static.train_types_other_operator.each_value { | train_type | puts train_type.same_as.ljust(48) + " " + train_type.name_ja } => custom.TrainType:Odakyu.Local 各停 custom.TrainType:Odakyu.SemiExpress 準急 custom.TrainType:Odakyu.TamaExpress 多摩急行 custom.TrainType:Odakyu.RomanceCar 特急ロマンスカー custom.TrainType:Seibu.Local 各停 custom.TrainType:Seibu.SemiExpress 準急 custom.TrainType:Seibu.Rapid 快速 custom.TrainType:Seibu.RapidExpress 快速急行 custom.TrainType:Tobu.SemiExpress 準急 custom.TrainType:Tobu.Express 急行 custom.TrainType:TobuTojo.Local 各停 custom.TrainType:Tokyu.Local 各停 custom.TrainType:Tokyu.Meguro.Local 各停 custom.TrainType:Tokyu.SemiExpress 準急 custom.TrainType:Tokyu.Express 急行 custom.TrainType:Tokyu.HolidayExpress 土休急行 custom.TrainType:Tokyu.CommuterLimitedExpress 通勤特急 custom.TrainType:Tokyu.LimitedExpress 特急 custom.TrainType:ToyoRapidRailway.ToyoRapid 東葉快速
# File lib/tokyo_metro/static/train_type/custom/other_operator/info.rb, line 165 def name_ja @train_type.name_ja end
name_ja_normal()
click to toggle source
種別の名称(日本語、標準) @return [String] @note name_ja_display については特に定義しない。 @example
TokyoMetro::Static.train_types_other_operator.each_value { | train_type | puts train_type.same_as.ljust(48) + " " + train_type.name_ja_normal } => custom.TrainType:Odakyu.Local 各停 custom.TrainType:Odakyu.SemiExpress 準急 custom.TrainType:Odakyu.TamaExpress 多摩急行 custom.TrainType:Odakyu.RomanceCar 特急 custom.TrainType:Seibu.Local 各停 custom.TrainType:Seibu.SemiExpress 準急 custom.TrainType:Seibu.Rapid 快速 custom.TrainType:Seibu.RapidExpress 快速急行 custom.TrainType:Tobu.SemiExpress 準急 custom.TrainType:Tobu.Express 急行 custom.TrainType:TobuTojo.Local 各停 custom.TrainType:Tokyu.Local 各停 custom.TrainType:Tokyu.Meguro.Local 各停 custom.TrainType:Tokyu.SemiExpress 準急 custom.TrainType:Tokyu.Express 急行 custom.TrainType:Tokyu.HolidayExpress 急行 custom.TrainType:Tokyu.CommuterLimitedExpress 通勤特急 custom.TrainType:Tokyu.LimitedExpress 特急 custom.TrainType:ToyoRapidRailway.ToyoRapid 東葉快速
# File lib/tokyo_metro/static/train_type/custom/other_operator/info.rb, line 224 def name_ja_normal @train_type.name_ja_normal end
to_s( indent = 0 )
click to toggle source
インスタンスの情報を文字列にして返すメソッド @return [String]
# File lib/tokyo_metro/static/train_type/custom/other_operator/info.rb, line 126 def to_s( indent = 0 ) str_1 = self.instance_variables.map { |v| k = v.to_s.gsub( /\A\@/ , "" ).ljust(32) val = self.instance_variable_get(v) unless v == :@same_as or v == :@note val = "\n" + val.to_s( indent + 2 ) end " " * indent + k + val.to_s }.join( "\n" ) "=" * 96 + "\n" + str_1 end