Sha256: 0f181c34804ba6a48bf84f67aa2bdf138792c6bd42090da8dd2fa0a50be944ea
Contents?: true
Size: 327 Bytes
Versions: 14
Compression:
Stored size: 327 Bytes
Contents
module Toy module Inspect extend ActiveSupport::Concern def inspect attributes_as_nice_string = self.class.attributes.keys.map(&:to_s).sort.map do |name| "#{name}: #{read_attribute(name).inspect}" end.join(", ") "#<#{self.class}:#{object_id} #{attributes_as_nice_string}>" end end end
Version data entries
14 entries across 14 versions & 1 rubygems