Class: Jubatus::Graph::Edge
- Inherits:
-
Object
- Object
- Jubatus::Graph::Edge
- Includes:
- Common
- Defined in:
- lib/jubatus/graph/types.rb
Constant Summary collapse
Instance Attribute Summary collapse
-
#property ⇒ Object
readonly
Returns the value of attribute property.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(property, source, target) ⇒ Edge
constructor
A new instance of Edge.
- #to_msgpack(out = '') ⇒ Object
- #to_s ⇒ Object
Methods included from Common
Constructor Details
#initialize(property, source, target) ⇒ Edge
Returns a new instance of Edge.
116 117 118 119 120 |
# File 'lib/jubatus/graph/types.rb', line 116 def initialize(property, source, target) @property = property @source = source @target = target end |
Instance Attribute Details
#property ⇒ Object (readonly)
Returns the value of attribute property.
142 143 144 |
# File 'lib/jubatus/graph/types.rb', line 142 def property @property end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
142 143 144 |
# File 'lib/jubatus/graph/types.rb', line 142 def source @source end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
142 143 144 |
# File 'lib/jubatus/graph/types.rb', line 142 def target @target end |
Class Method Details
Instance Method Details
#to_msgpack(out = '') ⇒ Object
122 123 124 125 |
# File 'lib/jubatus/graph/types.rb', line 122 def to_msgpack(out = '') t = [@property, @source, @target] return TYPE.to_msgpack(t) end |
#to_s ⇒ Object
132 133 134 135 136 137 138 139 140 |
# File 'lib/jubatus/graph/types.rb', line 132 def to_s gen = Jubatus::Common::MessageStringGenerator.new gen.open("edge") gen.add("property", @property) gen.add("source", @source) gen.add("target", @target) gen.close() return gen.to_s end |