Class: ThriftClient::Simple::Field
- Inherits:
-
Object
- Object
- ThriftClient::Simple::Field
- Defined in:
- lib/vendor/thrift_client/simple.rb
Overview
Instance Attribute Summary collapse
-
#fid ⇒ Object
Returns the value of attribute fid.
-
#name ⇒ Object
Returns the value of attribute name.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name, type, fid) ⇒ Field
constructor
A new instance of Field.
- #pack(value) ⇒ Object
Constructor Details
#initialize(name, type, fid) ⇒ Field
Returns a new instance of Field.
203 204 205 206 207 |
# File 'lib/vendor/thrift_client/simple.rb', line 203 def initialize(name, type, fid) @name = name @type = type @fid = fid end |
Instance Attribute Details
#fid ⇒ Object
Returns the value of attribute fid.
201 202 203 |
# File 'lib/vendor/thrift_client/simple.rb', line 201 def fid @fid end |
#name ⇒ Object
Returns the value of attribute name.
201 202 203 |
# File 'lib/vendor/thrift_client/simple.rb', line 201 def name @name end |
#type ⇒ Object
Returns the value of attribute type.
201 202 203 |
# File 'lib/vendor/thrift_client/simple.rb', line 201 def type @type end |
Instance Method Details
#pack(value) ⇒ Object
209 210 211 |
# File 'lib/vendor/thrift_client/simple.rb', line 209 def pack(value) value.nil? ? "" : [ type.to_i, fid, ThriftClient::Simple.pack_value(type, value) ].pack("cna*") end |