Class: Speedtest::Result
- Inherits:
-
Object
- Object
- Speedtest::Result
- Defined in:
- lib/speedtest/result.rb
Instance Attribute Summary collapse
-
#download_rate ⇒ Object
Returns the value of attribute download_rate.
-
#latency ⇒ Object
Returns the value of attribute latency.
-
#pretty_download_rate ⇒ Object
Returns the value of attribute pretty_download_rate.
-
#pretty_upload_rate ⇒ Object
Returns the value of attribute pretty_upload_rate.
-
#server ⇒ Object
Returns the value of attribute server.
-
#upload_rate ⇒ Object
Returns the value of attribute upload_rate.
Instance Method Summary collapse
-
#initialize(values = {}) ⇒ Result
constructor
A new instance of Result.
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_rate ⇒ Object
Returns the value of attribute download_rate.
3 4 5 |
# File 'lib/speedtest/result.rb', line 3 def download_rate @download_rate end |
#latency ⇒ Object
Returns the value of attribute latency.
3 4 5 |
# File 'lib/speedtest/result.rb', line 3 def latency @latency end |
#pretty_download_rate ⇒ Object
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_rate ⇒ Object
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 |
#server ⇒ Object
Returns the value of attribute server.
3 4 5 |
# File 'lib/speedtest/result.rb', line 3 def server @server end |
#upload_rate ⇒ Object
Returns the value of attribute upload_rate.
3 4 5 |
# File 'lib/speedtest/result.rb', line 3 def upload_rate @upload_rate end |