module TokyoMetro::Modules::Common::ToFactory::Generate::Info::ClassMethods
Public Instance Methods
factory_for_this_class()
click to toggle source
# File lib/tokyo_metro/modules/common/to_factory/generate/info.rb, line 18 def factory_for_this_class factory_for_generating_from_hash end
generate_from_hash( *variables )
click to toggle source
@!group クラスメソッド (2) - データの取得・保存 である Hash からインスタンスを作成するメソッド 与えられた Hash からインスタンスを作成するメソッド @param variables [::Hash] API からのデータを処理する場合 … 変数は1つ。API から取得した JSON をパースして得られた配列の要素。 @param variables [::Array] Static
なデータを処理する場合 … 変数は2つ。第1変数は作成するインスタンスの ID キー。第2変数は YAML をパースして得られた配列の要素。 @return [Info]
# File lib/tokyo_metro/modules/common/to_factory/generate/info.rb, line 14 def generate_from_hash( *variables ) factory_for_this_class.process( *variables ) end