Class: Speedtest::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/speedtest/result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(values = {}) ⇒ Result

Returns a new instance of Result.



4
5
6
7
8
9
10
11
# File 'lib/speedtest/result.rb', line 4

def initialize(values = {})
  @server = values[:server] rescue nil
  @latency = values[:latency] rescue nil
  @download_rate = values[:download_rate] rescue nil
  @upload_rate = values[:upload_rate] rescue nil
  @pretty_download_rate = values[:pretty_download_rate] rescue nil
  @pretty_upload_rate = values[:pretty_upload_rate] rescue nil
end

Instance Attribute Details

#download_rateObject

Returns the value of attribute download_rate.



3
4
5
# File 'lib/speedtest/result.rb', line 3

def download_rate
  @download_rate
end

#latencyObject

Returns the value of attribute latency.



3
4
5
# File 'lib/speedtest/result.rb', line 3

def latency
  @latency
end

#pretty_download_rateObject

Returns the value of attribute pretty_download_rate.



3
4
5
# File 'lib/speedtest/result.rb', line 3

def pretty_download_rate
  @pretty_download_rate
end

#pretty_upload_rateObject

Returns the value of attribute pretty_upload_rate.



3
4
5
# File 'lib/speedtest/result.rb', line 3

def pretty_upload_rate
  @pretty_upload_rate
end

#serverObject

Returns the value of attribute server.



3
4
5
# File 'lib/speedtest/result.rb', line 3

def server
  @server
end

#upload_rateObject

Returns the value of attribute upload_rate.



3
4
5
# File 'lib/speedtest/result.rb', line 3

def upload_rate
  @upload_rate
end