Sha256: 282bb48f1626794bb26b8fb524307a049071478036088e7a9379f70de1b081e3
Contents?: true
Size: 420 Bytes
Versions: 1
Compression:
Stored size: 420 Bytes
Contents
module Findable module Inspection extend ActiveSupport::Concern module ClassMethods def inspect "#{self}(#{column_names.map(&:inspect).join(', ')})" end end def inspect _attributes = self.class.column_names.each_with_object([]) {|name, obj| obj << "#{name}: #{public_send(name).inspect}" }.join(",\s") "#<#{self.class} #{_attributes}>" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
findable-0.1.4 | lib/findable/inspection.rb |