Class: Jubatus::Graph::Query
- Inherits:
-
Object
- Object
- Jubatus::Graph::Query
- Includes:
- Common
- Defined in:
- lib/jubatus/graph/types.rb
Constant Summary collapse
Instance Attribute Summary collapse
-
#from_id ⇒ Object
readonly
Returns the value of attribute from_id.
-
#to_id ⇒ Object
readonly
Returns the value of attribute to_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(from_id, to_id) ⇒ Query
constructor
A new instance of Query.
- #to_msgpack(out = '') ⇒ Object
- #to_s ⇒ Object
Methods included from Common
Constructor Details
#initialize(from_id, to_id) ⇒ Query
Returns a new instance of Query.
50 51 52 53 |
# File 'lib/jubatus/graph/types.rb', line 50 def initialize(from_id, to_id) @from_id = from_id @to_id = to_id end |
Instance Attribute Details
#from_id ⇒ Object (readonly)
Returns the value of attribute from_id.
74 75 76 |
# File 'lib/jubatus/graph/types.rb', line 74 def from_id @from_id end |
#to_id ⇒ Object (readonly)
Returns the value of attribute to_id.
74 75 76 |
# File 'lib/jubatus/graph/types.rb', line 74 def to_id @to_id end |
Class Method Details
Instance Method Details
#to_msgpack(out = '') ⇒ Object
55 56 57 58 |
# File 'lib/jubatus/graph/types.rb', line 55 def to_msgpack(out = '') t = [@from_id, @to_id] return TYPE.to_msgpack(t) end |
#to_s ⇒ Object
65 66 67 68 69 70 71 72 |
# File 'lib/jubatus/graph/types.rb', line 65 def to_s gen = Jubatus::Common::MessageStringGenerator.new gen.open("query") gen.add("from_id", @from_id) gen.add("to_id", @to_id) gen.close() return gen.to_s end |