Class: Stark::Client
- Inherits:
-
Object
- Object
- Stark::Client
- Includes:
- ProtocolHelpers
- Defined in:
- lib/stark/client.rb
Constant Summary
Constants included from ProtocolHelpers
ProtocolHelpers::COERCION_FROM_STRING, ProtocolHelpers::COERCION_TO_STRING, ProtocolHelpers::THRIFT_TO_RUBY
Instance Method Summary collapse
- #handle_exception(mtype) ⇒ Object
-
#initialize(iprot, oprot) ⇒ Client
constructor
A new instance of Client.
Methods included from ProtocolHelpers
#expect, #expect_list, #expect_map, #expect_set, #hash_cast, #valid_element_type?, #value_for_write
Constructor Details
#initialize(iprot, oprot) ⇒ Client
Returns a new instance of Client.
8 9 10 11 |
# File 'lib/stark/client.rb', line 8 def initialize(iprot, oprot) @iprot = iprot @oprot = oprot end |
Instance Method Details
#handle_exception(mtype) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/stark/client.rb', line 13 def handle_exception(mtype) if mtype == Thrift::MessageTypes::EXCEPTION x = Thrift::ApplicationException.new x.read(@iprot) @iprot. raise x end end |