Module: Crm::Core::Mixins::Inspectable

Extended by:
ActiveSupport::Concern
Included in:
Account, Activity, Crm::Collection, Crm::Contact, ItemEnumerator, Event, EventContact, Mailing, MailingDelivery, MailingRecipient, TemplateSet, Type
Defined in:
lib/crm/core/mixins/inspectable.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#inspectObject



5
6
7
8
9
10
11
12
13
# File 'lib/crm/core/mixins/inspectable.rb', line 5

def inspect
  field_values = self.class.inspectable_fields.map do |field|
    value = self.send(field).inspect

    "#{field}=#{value}"
  end

  "#<#{self.class.name} #{field_values.join(', ')}>"
end