Class: Dse::Graph::VertexProperty

Inherits:
Object
  • Object
show all
Defined in:
lib/dse/graph/vertex_property.rb

Overview

Encapsulates a vertex-property complex value. The name of the property is stored in the owning Vertex. This object contains a simple property value and any meta-properties that go with it.

VertexProperty's are created when creating a Vertex object out of a graph query result hash. Access to meta-properties is done via the #properties attribute, but there is also a short-cut using array/hash dereference syntax:

Examples:

val = vp.properties['meta1']
# is the same as
val = vp['meta1']

Instance Attribute Summary collapse

Instance Attribute Details

#idHash (readonly)

Returns id of this property.

Returns:

  • (Hash)

    id of this property



24
25
26
# File 'lib/dse/graph/vertex_property.rb', line 24

def id
  @id
end

#propertiesHash<String, String> (readonly)

Returns meta-properties of this property.

Returns:

  • (Hash<String, String>)

    meta-properties of this property



28
29
30
# File 'lib/dse/graph/vertex_property.rb', line 28

def properties
  @properties
end

#valueString (readonly)

Returns value of this property.

Returns:

  • (String)

    value of this property



26
27
28
# File 'lib/dse/graph/vertex_property.rb', line 26

def value
  @value
end