class ThriftClient::Simple::Field


Attributes

fid[RW]
name[RW]
type[RW]

Public Class Methods

new(name, type, fid) click to toggle source
# File lib/thrift_client/simple.rb, line 181
def initialize(name, type, fid)
  @name = name
  @type = type
  @fid = fid
end

Public Instance Methods

pack(value) click to toggle source
# File lib/thrift_client/simple.rb, line 187
def pack(value)
  value.nil? ? "" : [ type.to_i, fid, ThriftClient::Simple.pack_value(type, value) ].pack("cna*")
end