Class: LookerSDK::Client::StreamingClient::Progress
- Inherits:
-
Object
- Object
- LookerSDK::Client::StreamingClient::Progress
- Defined in:
- lib/looker-sdk/client.rb
Instance Attribute Summary collapse
-
#chunks ⇒ Object
Returns the value of attribute chunks.
-
#length ⇒ Object
Returns the value of attribute length.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #add_chunk(chunk) ⇒ Object
-
#initialize(response) ⇒ Progress
constructor
A new instance of Progress.
- #stop ⇒ Object
- #stopped? ⇒ Boolean
Constructor Details
#initialize(response) ⇒ Progress
Returns a new instance of Progress.
343 344 345 346 347 |
# File 'lib/looker-sdk/client.rb', line 343 def initialize(response) @response = response @chunks = @length = 0 @stopped = false end |
Instance Attribute Details
#chunks ⇒ Object
Returns the value of attribute chunks.
341 342 343 |
# File 'lib/looker-sdk/client.rb', line 341 def chunks @chunks end |
#length ⇒ Object
Returns the value of attribute length.
341 342 343 |
# File 'lib/looker-sdk/client.rb', line 341 def length @length end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
340 341 342 |
# File 'lib/looker-sdk/client.rb', line 340 def response @response end |
Instance Method Details
#add_chunk(chunk) ⇒ Object
349 350 351 352 |
# File 'lib/looker-sdk/client.rb', line 349 def add_chunk(chunk) @chunks += 1 @length += chunk.length end |
#stop ⇒ Object
354 355 356 |
# File 'lib/looker-sdk/client.rb', line 354 def stop @stopped = true end |
#stopped? ⇒ Boolean
358 359 360 |
# File 'lib/looker-sdk/client.rb', line 358 def stopped? @stopped end |