Sha256: c0ca5205ea41ec7b12216b0d59ef0ea3ca6cb58e535e6a05b5fac8115af13a8e

Contents?: true

Size: 443 Bytes

Versions: 23

Compression:

Stored size: 443 Bytes

Contents

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

def inspect
  error_messages = errors.any? ? "<E*#{errors.full_messages * ', '}*>" : ""
  "#<Card##{id}[#{debug_type}](#{name})#{error_messages}{#{inspect_tags * ','}}"
end

private

def inspect_tags
  %w[trash new frozen readonly virtual set_mods_loaded].map do |tag|
    tag if send "#{tag}?"
  end.compact
end

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

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
card-1.108.1 mod/core/set/all/debug.rb
card-1.108.0 mod/core/set/all/debug.rb
card-1.107.0 mod/core/set/all/debug.rb
card-1.106.0 mod/core/set/all/debug.rb
card-1.105.6 mod/core/set/all/debug.rb
card-1.105.5 mod/core/set/all/debug.rb
card-1.105.4 mod/core/set/all/debug.rb
card-1.105.3 mod/core/set/all/debug.rb
card-1.105.2.pre1 mod/core/set/all/debug.rb
card-1.105.2 mod/core/set/all/debug.rb
card-1.105.1 mod/core/set/all/debug.rb
card-1.105.0 mod/core/set/all/debug.rb
card-1.104.2 mod/core/set/all/debug.rb
card-1.104.1 mod/core/set/all/debug.rb
card-1.104.0 mod/core/set/all/debug.rb
card-1.103.4 mod/core/set/all/debug.rb
card-1.103.3 mod/core/set/all/debug.rb
card-1.103.2 mod/core/set/all/debug.rb
card-1.103.1 mod/core/set/all/debug.rb
card-1.103.0 mod/core/set/all/debug.rb