Module: Card::Set::All::ActiveCard
- Extended by:
- Card::Set
- Defined in:
- tmpsets/set/mod003-core/all/active_card.rb
Overview
Set: All cards (ActiveCard)
Constant Summary
Constants included from Helpers
Helpers::SET_PATTERN_TEST_REGEXP
Class Method Summary collapse
Instance Method Summary collapse
-
#format(opts = {}) ⇒ Object
FIXME: -this needs a better home!.
-
#trait_var(_var_name, &_block) ⇒ Object
following may be useful, but is neither tested nor in use.
Methods included from Card::Set
Methods included from I18nScope
Methods included from Loader
#clean_empty_module_from_hash, #clean_empty_modules, #extended, #process_base_modules, #register_set
Methods included from Helpers
#method_missing, #num_set_parts, #pattern_code, #respond_to_missing?, #set_name_parts, #shortname, #underscore
Methods included from Card::Set::AdvancedApi
#attachment, #ensure_set, #stage_method
Methods included from Format
#before, layout_method_name, #view, view_method_name, view_setting_method_name, wrapper_method_name
Methods included from Inheritance
#include_set, #include_set_formats
Methods included from Basket
#abstract_basket, #add_to_basket, #basket, #unshift_basket
Methods included from Trait
#card_accessor, #card_reader, #card_writer, #require_field
Methods included from Event::Api
Class Method Details
.source_location ⇒ Object
7 |
# File 'tmpsets/set/mod003-core/all/active_card.rb', line 7 def self.source_location; "/Users/ethan/dev/decko/gem/card/mod/core/set/all/active_card.rb"; end |
Instance Method Details
#format(opts = {}) ⇒ Object
FIXME: -this needs a better home!
38 39 40 41 |
# File 'tmpsets/set/mod003-core/all/active_card.rb', line 38 def format opts={} opts = { format: opts.to_sym } if [Symbol, String].member? opts.class Card::Format.new self, opts end |
#trait_var(_var_name, &_block) ⇒ Object
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
29 30 31 32 33 34 35 |
# File 'tmpsets/set/mod003-core/all/active_card.rb', line 29 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 |