Class: Protobuf::Rpc::Connectors::Base
- Inherits:
-
Object
- Object
- Protobuf::Rpc::Connectors::Base
- Includes:
- Logger::LogMethods
- Defined in:
- lib/protobuf/rpc/connectors/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#complete_cb ⇒ Object
Returns the value of attribute complete_cb.
-
#failure_cb ⇒ Object
Returns the value of attribute failure_cb.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#success_cb ⇒ Object
Returns the value of attribute success_cb.
Instance Method Summary collapse
- #async? ⇒ Boolean
-
#initialize(options) ⇒ Base
constructor
A new instance of Base.
- #send_request ⇒ Object
Constructor Details
#initialize(options) ⇒ Base
Returns a new instance of Base.
29 30 31 |
# File 'lib/protobuf/rpc/connectors/base.rb', line 29 def initialize() @options = DEFAULT_OPTIONS.merge() end |
Instance Attribute Details
#complete_cb ⇒ Object
Returns the value of attribute complete_cb.
27 28 29 |
# File 'lib/protobuf/rpc/connectors/base.rb', line 27 def complete_cb @complete_cb end |
#failure_cb ⇒ Object
Returns the value of attribute failure_cb.
27 28 29 |
# File 'lib/protobuf/rpc/connectors/base.rb', line 27 def failure_cb @failure_cb end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
26 27 28 |
# File 'lib/protobuf/rpc/connectors/base.rb', line 26 def @options end |
#success_cb ⇒ Object
Returns the value of attribute success_cb.
27 28 29 |
# File 'lib/protobuf/rpc/connectors/base.rb', line 27 def success_cb @success_cb end |
Instance Method Details
#async? ⇒ Boolean
37 38 39 |
# File 'lib/protobuf/rpc/connectors/base.rb', line 37 def async? !!@options[:async] end |
#send_request ⇒ Object
33 34 35 |
# File 'lib/protobuf/rpc/connectors/base.rb', line 33 def send_request raise 'If you inherit a Connector from Base you must implement send_request' end |