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_headers(&block) {|Typhoeus::Response| ... } ⇒ Array<Block>
Set on_headers callback.
-
#on_progress(&block) {|Typhoeus::Response| ... } ⇒ Array<Block>
Set on_progress 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.
39 40 41 42 43 |
# File 'lib/typhoeus/request/callbacks.rb', line 39 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.
71 72 73 74 75 |
# File 'lib/typhoeus/request/callbacks.rb', line 71 def on_failure(&block) @on_failure ||= [] @on_failure << block if block_given? @on_failure end |
#on_headers(&block) {|Typhoeus::Response| ... } ⇒ Array<Block>
Set on_headers callback.
87 88 89 90 91 |
# File 'lib/typhoeus/request/callbacks.rb', line 87 def on_headers(&block) @on_headers ||= [] @on_headers << block if block_given? @on_headers end |
#on_progress(&block) {|Typhoeus::Response| ... } ⇒ Array<Block>
Set on_progress callback.
105 106 107 108 109 |
# File 'lib/typhoeus/request/callbacks.rb', line 105 def on_progress(&block) @on_progress ||= [] @on_progress << block if block_given? @on_progress end |
#on_success(&block) {|Typhoeus::Response| ... } ⇒ Array<Block>
Set on_success callback.
55 56 57 58 59 |
# File 'lib/typhoeus/request/callbacks.rb', line 55 def on_success(&block) @on_success ||= [] @on_success << block if block_given? @on_success end |