Class: Integrity::Build
- Includes:
- DataMapper::Resource
- Defined in:
- lib/integrity/build.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.pending ⇒ Object
17 18 19 |
# File 'lib/integrity/build.rb', line 17 def self.pending all(:started_at => nil) end |
Instance Method Details
#building? ⇒ Boolean
25 26 27 |
# File 'lib/integrity/build.rb', line 25 def building? ! started_at.nil? && completed_at.nil? end |
#failed? ⇒ Boolean
29 30 31 |
# File 'lib/integrity/build.rb', line 29 def failed? !successful? end |
#pending? ⇒ Boolean
21 22 23 |
# File 'lib/integrity/build.rb', line 21 def pending? started_at.nil? end |
#status ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'lib/integrity/build.rb', line 33 def status case when pending? then :pending when building? then :building when successful? then :success when failed? then :failed end end |