Sha256: 0d073d329ffbb0f1a25864818e382a091f33e211b3970860b6bac6e4ac50b9e7

Contents?: true

Size: 741 Bytes

Versions: 52

Compression:

Stored size: 741 Bytes

Contents

=begin

# following may be useful, but is neither tested nor in use

def card_attributes
  if Card::Set.traits
    set_modules.each do |mod|
      if mod_traits = Card::Set.traits[mod]
        return mod_traits
      end
    end
  end
  nil
end

def trait_var? var_name
  !instance_variable_get( var_name ).nil?
end

=end

def trait_var _var_name, &_block
  # FIXME: - following optimization attempt needs to handle cache clearing!
  #  instance_variable_get var_name or begin
  #    instance_variable_set var_name, block_given? ? yield : raise("no block?")
  #  end
  yield
end

# FIXME: -this needs a better home!
def format opts={}
  opts = { format: opts.to_sym } if [Symbol, String].member? opts.class
  Card::Format.new self, opts
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
card-1.99.6 mod/core/set/all/active_card.rb
card-1.99.5 mod/core/set/all/active_card.rb
card-1.99.4 mod/core/set/all/active_card.rb
card-1.99.3 mod/core/set/all/active_card.rb
card-1.99.2 mod/core/set/all/active_card.rb
card-1.99.1 mod/core/set/all/active_card.rb
card-1.99.0 mod/core/set/all/active_card.rb
card-1.98.3 mod/core/set/all/active_card.rb
card-1.98.2 mod/core/set/all/active_card.rb
card-1.98.1 mod/core/set/all/active_card.rb
card-1.98.0 mod/core/set/all/active_card.rb
card-1.97.0.1 mod/core/set/all/active_card.rb
card-1.97.0 mod/core/set/all/active_card.rb
card-1.96.8 mod/core/set/all/active_card.rb
card-1.96.7 mod/core/set/all/active_card.rb
card-1.96.6 mod/core/set/all/active_card.rb
card-1.96.5 mod/core/set/all/active_card.rb
card-1.96.4 mod/core/set/all/active_card.rb
card-1.96.3 mod/core/set/all/active_card.rb
card-1.96.2 mod/core/set/all/active_card.rb