Module: Card::Set::All::TrackedAttributes
- Extended by:
- Card::Set
- Defined in:
- tmpsets/set/mod001-core/all/tracked_attributes.rb
Instance Method Summary collapse
-
#assign_attributes(args = {}) ⇒ Object
~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/core/set/all/tracked_attributes.rb ~~.
- #assign_set_specific_attributes ⇒ Object
Methods included from I18nScope
Methods included from Loader
#clean_empty_module_from_hash, #clean_empty_modules, #extended, #pattern_and_modules_from_path, #process_base_modules, #register_set, #tmp_file_template, #write_tmp_file
Methods included from Helpers
#abstract_set?, #all_set?, #shortname
Methods included from Card::Set::AdvancedApi
#attachment, #ensure_set, #stage_method
Methods included from Format
#all_set_format_mod!, #define_on_format, #format, #register_set_format, #view
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
Instance Method Details
#assign_attributes(args = {}) ⇒ Object
~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/core/set/all/tracked_attributes.rb ~~
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'tmpsets/set/mod001-core/all/tracked_attributes.rb', line 4 def assign_attributes args={} if args args = args.stringify_keys @set_specific = {} Card.set_specific_attributes.each do |key| @set_specific[key] = args.delete(key) if args[key] end new_type_id = extract_type_id! args unless args.delete("skip_type_lookup") subcard_args = extract_subcard_args! args args["type_id"] = new_type_id if new_type_id reset_patterns end params = ActionController::Parameters.new(args) params.permit! super params return unless args && subcard_args.present? # name= must come before process subcards subcards.add subcard_args end |
#assign_set_specific_attributes ⇒ Object
25 26 27 28 29 30 |
# File 'tmpsets/set/mod001-core/all/tracked_attributes.rb', line 25 def assign_set_specific_attributes return unless @set_specific.present? @set_specific.each_pair do |name, value| send "#{name}=", value end end |