Class: Puppeteer::NetworkCondition

Inherits:
Object
  • Object
show all
Defined in:
lib/puppeteer/network_condition.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(download:, upload:, latency:) ⇒ NetworkCondition

Returns a new instance of NetworkCondition.

Parameters:

  • download (Number)

    Download speed (bytes/s)

  • upload (Number)

    Upload speed (bytes/s)

  • latency (Number)

    Latency (ms)



5
6
7
8
9
# File 'lib/puppeteer/network_condition.rb', line 5

def initialize(download:, upload:, latency:)
  @download = download
  @upload = upload
  @latency = latency
end

Instance Attribute Details

#downloadObject (readonly)

Returns the value of attribute download.



11
12
13
# File 'lib/puppeteer/network_condition.rb', line 11

def download
  @download
end

#latencyObject (readonly)

Returns the value of attribute latency.



11
12
13
# File 'lib/puppeteer/network_condition.rb', line 11

def latency
  @latency
end

#uploadObject (readonly)

Returns the value of attribute upload.



11
12
13
# File 'lib/puppeteer/network_condition.rb', line 11

def upload
  @upload
end