Sha256: c45c4629ae40ae6cc9cf96db308de7e92c48bff02576baa8a2cb00df6443070b

Contents?: true

Size: 431 Bytes

Versions: 7

Compression:

Stored size: 431 Bytes

Contents

# -*- encoding : utf-8 -*-

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

def trait_var var_name, &block
  instance_variable_get( var_name ) ||
    instance_variable_set( var_name, block_given? ? yield : raise("no block?") )
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
wagn-1.12.13 mods/core/sets/all/active_card.rb
wagn-1.12.12 mods/core/sets/all/active_card.rb
wagn-1.12.11 mods/core/sets/all/active_card.rb
wagn-1.12.10 mods/core/sets/all/active_card.rb
wagn-1.12.9 mods/core/sets/all/active_card.rb
wagn-1.12.8 mods/core/sets/all/active_card.rb
wagn-1.12.7 mods/core/sets/all/active_card.rb