module Neo4j::Shared::TypecastedAttributes::ClassMethods

Public Instance Methods

_attribute_type(attribute_name) click to toggle source

Calculates an attribute type

@private

   # File lib/neo4j/shared/typecasted_attributes.rb
89 def _attribute_type(attribute_name)
90   attributes[attribute_name].type || Object
91 end
inspect() click to toggle source

Returns the class name plus its attribute names and types

@example Inspect the model's definition.

Person.inspect

@return [String] Human-readable presentation of the attributes

   # File lib/neo4j/shared/typecasted_attributes.rb
80 def inspect
81   inspected_attributes = attribute_names.sort.map { |name| "#{name}: #{_attribute_type(name)}" }
82   attributes_list = "(#{inspected_attributes.join(', ')})" unless inspected_attributes.empty?
83   "#{name}#{attributes_list}"
84 end
typecast_attribute(typecaster, value) click to toggle source
   # File lib/neo4j/shared/typecasted_attributes.rb
93 def typecast_attribute(typecaster, value)
94   Neo4j::Shared::TypeConverters.typecast_attribute(typecaster, value)
95 end