Module: Card::Set::All::TrackedAttributes
- Extended by:
- Card::Set
- Defined in:
- tmpsets/set/mod001-01_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/01_core/set/all/tracked_attributes.rb ~~~~~~~~~~~.
- #assign_set_specific_attributes ⇒ Object
Methods included from Card::Set
abstract_set?, all_set?, card_accessor, card_reader, card_writer, clean_empty_module_from_hash, clean_empty_modules, define_on_format, ensure_set, extended, format, process_base_module_list, process_base_modules, register_set, register_set_format, shortname, stage_method, view, write_tmp_file
Methods included from Event
Instance Method Details
#assign_attributes(args = {}) ⇒ Object
~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/01_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 24 |
# File 'tmpsets/set/mod001-01_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
26 27 28 29 30 31 |
# File 'tmpsets/set/mod001-01_core/all/tracked_attributes.rb', line 26 def assign_set_specific_attributes return unless @set_specific.present? @set_specific.each_pair do |name, value| send "#{name}=", value end end |