Module: Gecko::Helpers::InspectionHelper
- Included in:
- Record::Base
- Defined in:
- lib/gecko/helpers/inspection_helper.rb
Overview
Helper for providing custom #inspect values to Records
Instance Method Summary collapse
-
#inspect ⇒ String
Overrides the default inspect to just return the defined attributes.
Instance Method Details
#inspect ⇒ String
Overrides the default inspect to just return the defined attributes
15 16 17 18 19 20 21 |
# File 'lib/gecko/helpers/inspection_helper.rb', line 15 def inspect inspection = self.class.attribute_set.map do |attribute| name = attribute.name "#{name}: #{attribute_for_inspect(name)}" end.join(', ') "#<#{self.class} #{inspection}>" end |