Class: IdService::Client
- Inherits:
-
Object
- Object
- IdService::Client
- Includes:
- Helpers, Thrift::Client
- Defined in:
- lib/id_service/client.rb
Instance Method Summary collapse
- #get_id ⇒ Object
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
- #open ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/id_service/client.rb', line 13 def initialize( = {}) .symbolize_keys! = .merge() @transport = Thrift::BufferedTransport.new(Thrift::Socket.new([:host], [:port])) protocol = Thrift::BinaryProtocol.new(@transport) @iprot = protocol @oprot = [:oprot] || protocol @seqid = 0 end |
Instance Method Details
#get_id ⇒ Object
29 30 31 32 |
# File 'lib/id_service/client.rb', line 29 def get_id() send_get_id() return recv_get_id() end |
#open ⇒ Object
25 26 27 |
# File 'lib/id_service/client.rb', line 25 def open @transport.open end |