Class: TokyoMetro::Static::TrainType

Inherits:
Object
  • Object
show all
Defined in:
lib/tokyo_metro/static/train_type.rb

Overview

列車種別の情報を扱うクラス

Defined Under Namespace

Modules: Custom Classes: Color, InApi

Class Method Summary collapse

Class Method Details

.set_constantnil

定数を定義するメソッド

Returns:

  • (nil)


6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/tokyo_metro/static/train_type.rb', line 6

def self.set_constant

  # IN_API
  ::TokyoMetro::Static::const_set( :TRAIN_TYPES_IN_API , ::TokyoMetro::Static::TrainType::InApi.generate_from_yaml )

  # COLOR
  ::TokyoMetro::Static::const_set( :TRAIN_TYPES_COLOR , ::TokyoMetro::Static::TrainType::Color.generate_from_yaml )

  # OTHER_OPERATOR - 【yamls】であることに注意
  ::TokyoMetro::Static::const_set( :TRAIN_TYPES_OTHER_OPERATOR , ::TokyoMetro::Static::TrainType::Custom::OtherOperator.generate_from_yamls )

  # DEFAULT
  h_default = ::TokyoMetro::Static::TrainType::Custom::DefaultSetting.generate_from_yaml
  ::TokyoMetro::Static::const_set( :TRAIN_TYPES_DEFAULT , h_default )

  # MAIN - 【yamls】であることに注意
  ::TokyoMetro::Static::const_set( :TRAIN_TYPES , ::TokyoMetro::Static::TrainType::Custom::Main.generate_from_yamls )

  return nil
end