Sha256: d86fef5e4cc97819baf1dd5665b112707af5bcbdfecec1235716753bd75ff7e2
Contents?: true
Size: 441 Bytes
Versions: 14
Compression:
Stored size: 441 Bytes
Contents
module Inspectionable def inspect attr_list = attributes.map do |key, value| value_str = if value.is_a? ActiveModel::Model "#<#{value.class}: #{format '%<id>#018x', id: value.object_id << 1}>" else value.inspect end "#{key}: #{value_str}" end.join ', ' "#<#{self.class}: #{format '%<id>#018x', id: object_id << 1} #{attr_list}>" end end
Version data entries
14 entries across 14 versions & 1 rubygems