Sha256: be8fa3df0fe442727e7c4d25ca5952a34a4a8b0c998cf572f97d915131cb1ff5
Contents?: true
Size: 870 Bytes
Versions: 1
Compression:
Stored size: 870 Bytes
Contents
# 各種ハッシュを作成するための Factory クラス - 1. 基本(配列から) class TokyoMetro::Factory::Generate::Static::MetaClass::Group::Fundamental::FromList < TokyoMetro::Factory::Generate::Static::MetaClass::Group::Fundamental # YAML ファイルからインスタンスを生成する際のロジック # @return [Proc] def generating_procedure( d_yaml ) raise "Error" unless d_yaml.instance_of?( ::Array ) ary = ::Array.new d_yaml.each do | item | ary << self.class.info_class_for_this_factory.generate_from_hash( item ) end self.class.list_class_for_this_factory.new( ary ) end def self.list_class_for_this_factory list_class end # 配列のクラス # @return [Const (class name)] def self.list_class raise "The class method \"#{__method__}\" is not defined yet in this class." end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tokyo_metro-0.10.1 | lib/tokyo_metro/factory/generate/static/meta_class/group/fundamental/from_list.rb |