Class: Ceres::Object

Inherits:
Object
  • Object
show all
Includes:
AttributeModule
Defined in:
lib/ceres/object.rb

Instance Method Summary collapse

Methods included from AttributeModule

included

Instance Method Details

#inspectObject



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/ceres/object.rb', line 7

def inspect
  attributes = self.class.attributes.map do |attribute|
    if attribute.inspector
      name = attribute.name

      " #{name}: #{attribute.inspector.inspect_object(self.send(name))}"
    end
  end.compact.join(",")

  sprintf("#<%p:%0#18x%s>", self.class, self.object_id << 1, attributes)
end