Sha256: e155da48661b2b156da7f6aeab017fe57c1879ce969d83eb516ff61ca96609ce

Contents?: true

Size: 734 Bytes

Versions: 22

Compression:

Stored size: 734 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

22 entries across 22 versions & 2 rubygems

Version Path
card-1.16.6 mod/01_core/set/all/active_card.rb
card-1.16.5 mod/01_core/set/all/active_card.rb
card-1.16.4 mod/01_core/set/all/active_card.rb
card-1.16.3 mod/01_core/set/all/active_card.rb
card-1.16.2 mod/01_core/set/all/active_card.rb
card-1.16.1 mod/01_core/set/all/active_card.rb
card-1.16.0 mod/01_core/set/all/active_card.rb
card-1.15.7 mod/01_core/set/all/active_card.rb
card-1.15.6 mod/01_core/set/all/active_card.rb
card-1.15.5 mod/01_core/set/all/active_card.rb
card-1.15.4 mod/01_core/set/all/active_card.rb
card-1.15.3 mod/01_core/set/all/active_card.rb
card-1.15.2 mod/01_core/set/all/active_card.rb
card-1.15.1 mod/01_core/set/all/active_card.rb
card-1.15.0 mod/01_core/set/all/active_card.rb
card-1.15.pre2 mod/01_core/set/all/active_card.rb
card-1.15.pre mod/01_core/set/all/active_card.rb
wagn-1.14.9 mod/01_core/set/all/active_card.rb
wagn-1.14.8 mod/01_core/set/all/active_card.rb
wagn-1.14.7 mod/01_core/set/all/active_card.rb