Releases: joelmoss/inspectacular
Releases · joelmoss/inspectacular
v1.0.0
First release! 🎉
Fed up of lengthy
#inspectoutput? 😩
Simply extend any object with Inspectacular to get a custom #inspect method with the given attributes.
class User < ApplicationRecord
extend Inspectacular[:id, :name, :email]
end
User.first.inspect #=> "#<User id: 1, name: 'John Doe', email: '<john@doe.com>'>If no attributes are given, the default is to inspect the object's #id attribute.
class Account < ApplicationRecord
extend Inspectacular
end
Account.first.inspect #=> "#<Account id: 1>