Class: RTrail::Run
- Defined in:
- lib/rtrail/run.rb
Instance Attribute Summary
Attributes inherited from Entity
Instance Method Summary collapse
- #complete_time ⇒ Object
- #completed? ⇒ Boolean
-
#summary ⇒ Object
Return a one-line summary of this Run.
- #tests ⇒ Object
Methods included from Helpers::HasCreateTime
Methods included from Methods::Close
Methods included from Methods::Delete
Methods included from Methods::Update
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
#complete_time ⇒ Object
34 35 36 37 |
# File 'lib/rtrail/run.rb', line 34 def complete_time return nil if !completed? return Time.at(self[:completed_on].to_i).utc end |
#completed? ⇒ Boolean
39 40 41 |
# File 'lib/rtrail/run.rb', line 39 def completed? return !self[:completed_on].nil? end |
#summary ⇒ Object
Return a one-line summary of this Run
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/rtrail/run.rb', line 15 def summary # TODO: Include these? # self.untested_count # self.blocked_count # self.passed_count # self.failed_count result = "#{self.id}: #{self.name}" if self.completed? result += " [completed #{self.complete_time}]" else result += " [not completed]" end return result end |
#tests ⇒ Object
30 31 32 |
# File 'lib/rtrail/run.rb', line 30 def tests return get_entities(Test, data.id) end |