Method: ActiveEntity::Core::ClassMethods#inspect

Defined in:
lib/active_entity/core.rb

#inspectObject

Returns a string like ‘Post(id:integer, title:string, body:text)’



58
59
60
61
62
63
64
65
# File 'lib/active_entity/core.rb', line 58

def inspect # :nodoc:
  if self == Base
    super
  else
    attr_list = attribute_types.map { |name, type| "#{name}: #{type.type}" } * ", "
    "#{super}#{ "(abstract)" if abstract_class? }(#{attr_list})"
  end
end