class TokyoMetro::Static::TrainType::Custom::Main::Info
個別の列車種別の情報(実際に時刻表などのクラスから参照されるもの)を扱うクラス
Attributes
css_class_name_in_document[R]
@return [String or nil] ドキュメント内で使用する CSS のクラス名
name_ja_to_haml[R]
@return [String] 補足情報
note[R]
@return [String] 補足情報
Public Class Methods
new( *ary )
click to toggle source
Constructor @param ary [::Array] 変数の配列(内部で展開する)
Calls superclass method
TokyoMetro::Static::TrainType::Custom::OtherOperator::Info::new
# File lib/tokyo_metro/static/train_type/custom/main/info.rb, line 10 def initialize( *ary ) *defined_in_superclass , note , css_class_name_in_document = ary super( *defined_in_superclass ) @note = note @css_class_name_in_document = css_class_name_in_document raise "Error: #{@same_as}" if @railway_line.nil? end
Public Instance Methods
css_class_name()
click to toggle source
CSS のクラスの名称 @return [String]
# File lib/tokyo_metro/static/train_type/custom/main/info.rb, line 49 def css_class_name "train_type_" + @same_as.gsub( /\Acustom\.TrainType\:/ , "" ).gsub( "TokyoMetro." , "" ).gsub( "\." , "_" ).underscore.downcase end
to_s( indent = 0 )
click to toggle source
インスタンスの情報を文字列にして返すメソッド @return [String]
Calls superclass method
TokyoMetro::Static::TrainType::Custom::OtherOperator::Info#to_s
# File lib/tokyo_metro/static/train_type/custom/main/info.rb, line 39 def to_s( indent = 0 ) str_1 = super( indent ) key_css = "css_class_name" str_1 + "\n" + " " * indent + key_css.ljust(32) + self.__send__( key_css ) end