Module: Card::Set::All::Utils

Extended by:
Card::Set
Defined in:
tmpsets/set/mod001-01_core/all/utils.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Methods included from Loader

#clean_empty_module_from_hash, #clean_empty_modules, #extended, #process_base_module_list, #process_base_modules, #register_set, #write_tmp_file

Methods included from Helpers

#abstract_set?, #all_set?, #attachment, #ensure_set, #include_set, #include_set_formats, #shortname, #stage_method

Methods included from Format

#all_set_format_mod!, #applicable_format?, #define_on_format, #each_format, #format, #register_set_format, #view

Methods included from Trait

#card_accessor, #card_reader, #card_writer

Methods included from Event

#define_event, #event

Instance Method Details

#debug_typeObject



98
99
100
# File 'tmpsets/set/mod001-01_core/all/utils.rb', line 98

def debug_type
  "#{type_code || 'no code'}:#{type_id}"
end

#inspectObject



106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'tmpsets/set/mod001-01_core/all/utils.rb', line 106

def inspect
  tags = []
  tags << 'trash'    if trash
  tags << 'new'      if new_card?
  tags << 'frozen'   if frozen?
  tags << 'readonly' if readonly?
  tags << 'virtual'  if @virtual
  tags << 'set_mods_loaded' if @set_mods_loaded

  error_messages = errors.any? ? "<E*#{errors.full_messages * ', '}*>" : ''

  "#<Card##{id}[#{debug_type}](#{name})#{error_messages}{#{tags * ','}}"
end

#to_sObject



102
103
104
# File 'tmpsets/set/mod001-01_core/all/utils.rb', line 102

def to_s
  "#<#{self.class.name}[#{debug_type}]#{attributes['name']}>"
end