Module: Typhoeus::Request::Callbacks::Types
- Included in:
- Typhoeus, Typhoeus::Request
- Defined in:
- lib/typhoeus/request/callbacks.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#on_complete(&block) {|Typhoeus::Response| ... } ⇒ Array<Block>
Set on_complete callback.
-
#on_failure(&block) {|Typhoeus::Response| ... } ⇒ Array<Block>
Set on_failure callback.
-
#on_success(&block) {|Typhoeus::Response| ... } ⇒ Array<Block>
Set on_success callback.
Instance Method Details
#on_complete(&block) {|Typhoeus::Response| ... } ⇒ Array<Block>
Set on_complete callback.
40 41 42 43 44 |
# File 'lib/typhoeus/request/callbacks.rb', line 40 def on_complete(&block) @on_complete ||= [] @on_complete << block if block_given? @on_complete end |
#on_failure(&block) {|Typhoeus::Response| ... } ⇒ Array<Block>
Set on_failure callback.
72 73 74 75 76 |
# File 'lib/typhoeus/request/callbacks.rb', line 72 def on_failure(&block) @on_failure ||= [] @on_failure << block if block_given? @on_failure end |
#on_success(&block) {|Typhoeus::Response| ... } ⇒ Array<Block>
Set on_success callback.
56 57 58 59 60 |
# File 'lib/typhoeus/request/callbacks.rb', line 56 def on_success(&block) @on_success ||= [] @on_success << block if block_given? @on_success end |