Sha256: ad20c06eda24e21b65dc61e7824a0baed4cc3881cd345a40163f8f34b2fc24e3
Contents?: true
Size: 915 Bytes
Versions: 1
Compression:
Stored size: 915 Bytes
Contents
# 各種ハッシュを作成するための Factory クラス - 1. 基本(ハッシュから) class TokyoMetro::Factory::Generate::Static::MetaClass::Group::Fundamental::FromHash < TokyoMetro::Factory::Generate::Static::MetaClass::Group::Fundamental private # YAML ファイルからインスタンスを生成する際のロジック # @return [Proc] def generating_procedure( d_yaml ) raise "Error" unless d_yaml.instance_of?( ::Hash ) group_new = self.class.hash_class_for_this_factory.new d_yaml.each do | key , value | group_new[ key ] = self.class.info_class_for_this_factory.generate_from_hash( key , value ) end group_new end def self.hash_class_for_this_factory hash_class end # ハッシュのクラス # @return [Const (class name)] def self.hash_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_hash.rb |