Class: Immunio::InputWrapper
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Immunio::InputWrapper
- Defined in:
- lib/immunio/plugins/http_tracker.rb
Instance Method Summary collapse
- #each ⇒ Object
- #gets ⇒ Object
-
#initialize(input) ⇒ InputWrapper
constructor
A new instance of InputWrapper.
- #read ⇒ Object
Constructor Details
#initialize(input) ⇒ InputWrapper
152 153 154 155 |
# File 'lib/immunio/plugins/http_tracker.rb', line 152 def initialize(input) super input @input = input end |
Instance Method Details
#each ⇒ Object
173 174 175 176 177 178 179 180 181 182 |
# File 'lib/immunio/plugins/http_tracker.rb', line 173 def each Request.time "plugin", "#{Module.nesting[0]}::#{__method__}" do @input.each do |chunk| report_chunk chunk Request.pause "plugin", "#{Module.nesting[0]}::#{__method__}" do yield chunk end end end end |
#gets ⇒ Object
157 158 159 160 161 162 163 |
# File 'lib/immunio/plugins/http_tracker.rb', line 157 def gets(*) v = super Request.time "plugin", "#{Module.nesting[0]}::#{__method__}" do report_chunk v end v end |
#read ⇒ Object
165 166 167 168 169 170 171 |
# File 'lib/immunio/plugins/http_tracker.rb', line 165 def read(*) v = super Request.time "plugin", "#{Module.nesting[0]}::#{__method__}" do report_chunk v end v end |