Class: ThriftServer::RPC
- Inherits:
-
Struct
- Object
- Struct
- ThriftServer::RPC
- Defined in:
- lib/thrift_server.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#exceptions ⇒ Object
Returns the value of attribute exceptions.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #exception_name(ex) ⇒ Object
-
#initialize ⇒ RPC
constructor
A new instance of RPC.
- #protocol_exception?(ex) ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ RPC
Returns a new instance of RPC.
24 25 26 27 |
# File 'lib/thrift_server.rb', line 24 def initialize(*) super self.exceptions ||= { } end |
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args
23 24 25 |
# File 'lib/thrift_server.rb', line 23 def args @args end |
#exceptions ⇒ Object
Returns the value of attribute exceptions
23 24 25 |
# File 'lib/thrift_server.rb', line 23 def exceptions @exceptions end |
#name ⇒ Object
Returns the value of attribute name
23 24 25 |
# File 'lib/thrift_server.rb', line 23 def name @name end |
Instance Method Details
#exception_name(ex) ⇒ Object
33 34 35 |
# File 'lib/thrift_server.rb', line 33 def exception_name(ex) exceptions.invert.fetch ex.class end |
#protocol_exception?(ex) ⇒ Boolean
29 30 31 |
# File 'lib/thrift_server.rb', line 29 def protocol_exception?(ex) exceptions.values.include? ex.class end |
#to_s ⇒ Object
37 38 39 |
# File 'lib/thrift_server.rb', line 37 def to_s name.to_s end |