Module: Card::Set::All::Initialize
- Extended by:
- Card::Set
- Defined in:
- tmpsets/set/mod002-core/all/initialize.rb
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- JUNK_INIT_ARGS =
~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/core/set/all/initialize.rb ~~
%w(missing skip_virtual id).freeze
Constants included from Format
Instance Method Summary collapse
Methods included from I18nScope
Methods included from Loader
#clean_empty_module_from_hash, #clean_empty_modules, #extended, #process_base_modules, #register_set
Methods included from Helpers
#abstract_set?, #all_set?, #num_set_parts, #shortname
Methods included from Card::Set::AdvancedApi
#attachment, #ensure_set, #stage_method
Methods included from Format
#all_set_format_mod!, #before, #define_on_format, #format, #register_set_format, #view, #view_for_override
Methods included from Inheritance
#include_set, #include_set_formats
Methods included from Basket
#abstract_basket, #add_to_basket, #basket
Methods included from Trait
#card_accessor, #card_reader, #card_writer
Methods included from Event::Api
Instance Method Details
#include_set_modules ⇒ Object
29 30 31 32 33 34 35 36 37 38 |
# File 'tmpsets/set/mod002-core/all/initialize.rb', line 29 def include_set_modules unless @set_mods_loaded set_modules.each do |m| singleton_class.send :include, m end assign_set_specific_attributes @set_mods_loaded = true end self end |
#initialize(args = {}) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'tmpsets/set/mod002-core/all/initialize.rb', line 16 def initialize args={} args["name"] = args["name"].to_s args["db_content"] = args.delete("content") if args["content"] @supercard = args.delete "supercard" # must come before name = skip_modules = args.delete "skip_modules" skip_type_lookup = args["skip_type_lookup"] super args # ActiveRecord #initialize self.type_id = get_type_id_from_structure if !type_id && !skip_type_lookup include_set_modules unless skip_modules self end |