Class: Jubatus::Common::TList

Inherits:
Object
  • Object
show all
Defined in:
lib/jubatus/common/types.rb

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ TList

Returns a new instance of TList.


123
124
125
# File 'lib/jubatus/common/types.rb', line 123

def initialize(type)
  @type = type
end

Instance Method Details

#from_msgpack(m) ⇒ Object


127
128
129
130
# File 'lib/jubatus/common/types.rb', line 127

def from_msgpack(m)
  Jubatus::Common.check_type(m, Array)
  return m.map { |v| @type.from_msgpack(v) }
end

#to_msgpack(m) ⇒ Object


132
133
134
135
# File 'lib/jubatus/common/types.rb', line 132

def to_msgpack(m)
  Jubatus::Common.check_type(m, Array)
  return m.map { |v| @type.to_msgpack(v) }
end