Class ThriftClient::Simple::Field
In: lib/thrift_client/simple.rb
lib/thrift_client/simple.rb
Parent: Object

Methods

new   new   pack   pack  

Attributes

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

Public Class methods

[Source]

     # File lib/thrift_client/simple.rb, line 181
181:       def initialize(name, type, fid)
182:         @name = name
183:         @type = type
184:         @fid = fid
185:       end

[Source]

     # File lib/thrift_client/simple.rb, line 181
181:       def initialize(name, type, fid)
182:         @name = name
183:         @type = type
184:         @fid = fid
185:       end

Public Instance methods

[Source]

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

[Source]

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

[Validate]