Class: RTrail::Test
- Includes:
- Methods::Get
- Defined in:
- lib/rtrail/test.rb
Instance Attribute Summary
Attributes inherited from Entity
Instance Method Summary collapse
-
#add_result(fields) ⇒ Object
Add a new Result to this test.
-
#latest_result ⇒ Object
Return the most recently created Result for this Test.
-
#results ⇒ Object
Return all Results for this Test.
Methods included from Methods::Get
Methods inherited from Entity
#add_entity, basename, client, #client, client=, #get_entities, #initialize, #method_missing
Methods included from Helpers
included, #is_id?, #path_with_params
Constructor Details
This class inherits a constructor from RTrail::Entity
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RTrail::Entity
Instance Method Details
#add_result(fields) ⇒ Object
Add a new Result to this test.
20 21 22 |
# File 'lib/rtrail/test.rb', line 20 def add_result(fields) return add_entity(Result, data.id, fields) end |
#latest_result ⇒ Object
Return the most recently created Result for this Test.
15 16 17 |
# File 'lib/rtrail/test.rb', line 15 def latest_result return get_entities(Result, data.id, :limit => 1).first end |
#results ⇒ Object
Return all Results for this Test.
10 11 12 |
# File 'lib/rtrail/test.rb', line 10 def results return get_entities(Result, data.id) end |