Class: Loaderio::Test
Instance Attribute Summary collapse
-
#duration ⇒ Object
readonly
Returns the value of attribute duration.
-
#from ⇒ Object
readonly
Returns the value of attribute from.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#request_type ⇒ Object
readonly
Returns the value of attribute request_type.
-
#results_data ⇒ Object
readonly
Returns the value of attribute results_data.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#test_id ⇒ Object
readonly
Returns the value of attribute test_id.
-
#timeout ⇒ Object
readonly
Returns the value of attribute timeout.
-
#to ⇒ Object
readonly
Returns the value of attribute to.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Test
constructor
A new instance of Test.
Methods inherited from Base
Constructor Details
#initialize(attributes) ⇒ Test
Returns a new instance of Test.
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/loaderio/test.rb', line 5 def initialize(attributes) @url = attributes[:url] @name = attributes[:name] @duration = attributes[:duration] @timeout = attributes[:timeout] @from = attributes[:from] @to = attributes[:to] @status = attributes[:status] @test_id = attributes[:test_id] @request_type = attributes[:request_type] @results_data = OpenStruct.new(attributes[:results_data]) super end |
Instance Attribute Details
#duration ⇒ Object (readonly)
Returns the value of attribute duration.
3 4 5 |
# File 'lib/loaderio/test.rb', line 3 def duration @duration end |
#from ⇒ Object (readonly)
Returns the value of attribute from.
3 4 5 |
# File 'lib/loaderio/test.rb', line 3 def from @from end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/loaderio/test.rb', line 3 def name @name end |
#request_type ⇒ Object (readonly)
Returns the value of attribute request_type.
3 4 5 |
# File 'lib/loaderio/test.rb', line 3 def request_type @request_type end |
#results_data ⇒ Object (readonly)
Returns the value of attribute results_data.
3 4 5 |
# File 'lib/loaderio/test.rb', line 3 def results_data @results_data end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
3 4 5 |
# File 'lib/loaderio/test.rb', line 3 def status @status end |
#test_id ⇒ Object (readonly)
Returns the value of attribute test_id.
3 4 5 |
# File 'lib/loaderio/test.rb', line 3 def test_id @test_id end |
#timeout ⇒ Object (readonly)
Returns the value of attribute timeout.
3 4 5 |
# File 'lib/loaderio/test.rb', line 3 def timeout @timeout end |
#to ⇒ Object (readonly)
Returns the value of attribute to.
3 4 5 |
# File 'lib/loaderio/test.rb', line 3 def to @to end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
3 4 5 |
# File 'lib/loaderio/test.rb', line 3 def url @url end |
Class Method Details
.resource_name ⇒ Object
19 20 21 |
# File 'lib/loaderio/test.rb', line 19 def self.resource_name "tests" end |
.results(id) ⇒ Object
23 24 25 |
# File 'lib/loaderio/test.rb', line 23 def self.results(id) new(parse(Loaderio::Configuration.resource["#{resource_name}/#{id}/results"].get)) end |