class Jubatus::Burst::Document

Constants

TYPE

Attributes

pos[R]
text[R]

Public Class Methods

from_msgpack(m) click to toggle source
# File lib/jubatus/burst/types.rb, line 125
def Document.from_msgpack(m)
  val = TYPE.from_msgpack(m)
  Document.new(*val)
end
new(pos, text) click to toggle source
# File lib/jubatus/burst/types.rb, line 115
def initialize(pos, text)
  @pos = pos
  @text = text
end

Public Instance Methods

to_msgpack(out = '') click to toggle source
# File lib/jubatus/burst/types.rb, line 120
def to_msgpack(out = '')
  t = [@pos, @text]
  return TYPE.to_msgpack(t)
end
to_s() click to toggle source
# File lib/jubatus/burst/types.rb, line 130
def to_s
  gen = Jubatus::Common::MessageStringGenerator.new
  gen.open("document")
  gen.add("pos", @pos)
  gen.add("text", @text)
  gen.close()
  return gen.to_s
end