Class: Puppeteer::NetworkCondition

Inherits:
Object
  • Object
show all
Defined in:
lib/puppeteer/network_condition.rb,
sig/_supplementary.rbs

Instance Attribute Summary collapse

Class Method 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)

  • download: (Numeric)
  • upload: (Numeric)
  • latency: (Numeric)


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

Class Method Details

.newPuppeteer::NetworkCondition

Parameters:

  • download: (Numeric)
  • upload: (Numeric)
  • latency: (Numeric)

Returns:



203
# File 'sig/_supplementary.rbs', line 203

def self.new: (download: Numeric, upload: Numeric, latency: Numeric) -> Puppeteer::NetworkCondition