Sha256: a02afe430574dbd8408cf127b8f7dba9e2bf85498bb5aec63ac6ee82b58d283d

Contents?: true

Size: 1.32 KB

Versions: 49

Compression:

Stored size: 1.32 KB

Contents

# -*- encoding : utf-8 -*-
class Card; module Set; class All; module Initialize; extend Card::Set
# ~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/core/set/all/initialize.rb ~~
JUNK_INIT_ARGS = %w(missing skip_virtual id).freeze

module ClassMethods
  def new args={}, _options={}
    args = (args || {}).stringify_keys
    JUNK_INIT_ARGS.each { |a| args.delete(a) }
    %w(type type_code).each { |k| args.delete(k) if args[k].blank? }
    args.delete("content") if args["attach"] # should not be handled here!
    super args
  end
end

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

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


# ~~ below autogenerated; above pulled from /Users/ethan/dev/wagn/gem/card/mod/core/set/all/initialize.rb ~~
end;end;end;end;

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
card-1.99.6 tmpsets/set/mod002-core/all/initialize.rb
card-1.99.5 tmpsets/set/mod002-core/all/initialize.rb
card-1.97.0.1 tmpsets/set/mod002-core/all/initialize.rb
card-1.97.0 tmpsets/set/mod002-core/all/initialize.rb
card-1.96.8 tmpsets/set/mod002-core/all/initialize.rb
card-1.96.7 tmpsets/set/mod002-core/all/initialize.rb
card-1.96.6 tmpsets/set/mod002-core/all/initialize.rb
card-1.96.5 tmpsets/set/mod002-core/all/initialize.rb
card-1.96.4 tmpsets/set/mod002-core/all/initialize.rb
card-1.96.3 tmpsets/set/mod002-core/all/initialize.rb
card-1.96.2 tmpsets/set/mod002-core/all/initialize.rb
card-1.96.1 tmpsets/set/mod002-core/all/initialize.rb
card-1.96.0 tmpsets/set/mod002-core/all/initialize.rb
card-1.95.3 tmpsets/set/mod002-core/all/initialize.rb
card-1.95.2 tmpsets/set/mod002-core/all/initialize.rb
card-1.95.1 tmpsets/set/mod002-core/all/initialize.rb
card-1.95.0 tmpsets/set/mod002-core/all/initialize.rb
card-1.94.1 tmpsets/set/mod002-core/all/initialize.rb
card-1.94.0 tmpsets/set/mod002-core/all/initialize.rb
card-1.93.13 tmpsets/set/mod002-core/all/initialize.rb