class Jubatus::Weight::Feature
Constants
- TYPE
Attributes
key[R]
value[R]
Public Class Methods
from_msgpack(m)
click to toggle source
# File lib/jubatus/weight/types.rb, line 25 def Feature.from_msgpack(m) val = TYPE.from_msgpack(m) Feature.new(*val) end
new(key, value)
click to toggle source
# File lib/jubatus/weight/types.rb, line 15 def initialize(key, value) @key = key @value = value end
Public Instance Methods
to_msgpack(out = '')
click to toggle source
# File lib/jubatus/weight/types.rb, line 20 def to_msgpack(out = '') t = [@key, @value] return TYPE.to_msgpack(t) end
to_s()
click to toggle source
# File lib/jubatus/weight/types.rb, line 30 def to_s gen = Jubatus::Common::MessageStringGenerator.new gen.open("feature") gen.add("key", @key) gen.add("value", @value) gen.close() return gen.to_s end