Class: LookerSDK::Client::StreamingClient::Progress

Inherits:
Object
  • Object
show all
Defined in:
lib/looker-sdk/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Progress

Returns a new instance of Progress.



341
342
343
344
345
# File 'lib/looker-sdk/client.rb', line 341

def initialize(response)
  @response = response
  @chunks = @length = 0
  @stopped = false
end

Instance Attribute Details

#chunksObject

Returns the value of attribute chunks.



339
340
341
# File 'lib/looker-sdk/client.rb', line 339

def chunks
  @chunks
end

#lengthObject

Returns the value of attribute length.



339
340
341
# File 'lib/looker-sdk/client.rb', line 339

def length
  @length
end

#responseObject (readonly)

Returns the value of attribute response.



338
339
340
# File 'lib/looker-sdk/client.rb', line 338

def response
  @response
end

Instance Method Details

#add_chunk(chunk) ⇒ Object



347
348
349
350
# File 'lib/looker-sdk/client.rb', line 347

def add_chunk(chunk)
  @chunks += 1
  @length += chunk.length
end

#stopObject



352
353
354
# File 'lib/looker-sdk/client.rb', line 352

def stop
  @stopped = true
end

#stopped?Boolean

Returns:

  • (Boolean)


356
357
358
# File 'lib/looker-sdk/client.rb', line 356

def stopped?
  @stopped
end