Module: Neo4j::Wrapper::Property::InstanceMethods

Included in:
NodeMixin, RelationshipMixin
Defined in:
lib/neo4j-wrapper/properties/instance_methods.rb

Instance Method Summary collapse

Instance Method Details

#attributesHash

Return a hash of ‘public’ properties. If there is an accessor method available it will use that. That means you can override the returned value of the property by implementing a method of the same name as the property. All properteis not starting with _ are considered public.

Returns:

  • (Hash)

    hash of properties with keys not starting with _



10
11
12
13
14
15
# File 'lib/neo4j-wrapper/properties/instance_methods.rb', line 10

def attributes
  attr = props
  ret = {}
  attr.each_pair { |k, v| ret[k] = respond_to?(k) ? send(k) : v unless k.to_s[0] == ?_ }
  ret
end