Module: Neo4j::Embedded::Property
- Extended by:
- Core::TxMethods
- Includes:
- PropertyContainer, PropertyValidator
- Defined in:
- lib/neo4j-embedded/property.rb
Constant Summary
Constant Summary
PropertyValidator::VALID_PROPERTY_VALUE_CLASSES
Instance Method Summary
(collapse)
tx_methods
#valid_property?, #validate_property
Instance Method Details
- (Object) [](key)
14
15
16
17
18
|
# File 'lib/neo4j-embedded/property.rb', line 14
def [](key)
return nil unless has_property?(key.to_s)
to_ruby_property(key.to_s)
end
|
- (Object) []=(k, v)
Sets the property of this node. Property keys are always strings. Valid
property value types are the primitives: (String
,
Fixnum
, Float
, FalseClass
,
TrueClass
) or an array of those primitives.
Gotchas
32
33
34
|
# File 'lib/neo4j-embedded/property.rb', line 32
def []=(k, v)
to_java_property(k, v)
end
|
- (Object) _update_props(hash)
53
54
55
|
# File 'lib/neo4j-embedded/property.rb', line 53
def _update_props(hash)
hash.each { |k, v| to_java_property(k, v) }
end
|
- (Object) neo_id
62
63
64
|
# File 'lib/neo4j-embedded/property.rb', line 62
def neo_id
get_id
end
|
- (Object) props
37
38
39
40
41
|
# File 'lib/neo4j-embedded/property.rb', line 37
def props
property_keys.each_with_object({}) do |key, ret|
ret[key.to_sym] = to_ruby_property(key)
end
end
|
- (Object) props=(hash)
44
45
46
47
48
49
50
|
# File 'lib/neo4j-embedded/property.rb', line 44
def props=(hash)
property_keys.each do |key|
remove_property(key)
end
_update_props(hash)
hash
end
|
- (Object) refresh
66
67
68
|
# File 'lib/neo4j-embedded/property.rb', line 66
def refresh
end
|
- (Object) update_props(hash)
57
58
59
|
# File 'lib/neo4j-embedded/property.rb', line 57
def update_props(hash)
_update_props(hash)
end
|