Class: Billd::Build
- Inherits:
-
Object
- Object
- Billd::Build
- Defined in:
- lib/billd/build.rb
Instance Method Summary collapse
-
#initialize(status) ⇒ Build
constructor
A new instance of Build.
- #name ⇒ Object
- #outcome ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(status) ⇒ Build
Returns a new instance of Build.
5 6 7 |
# File 'lib/billd/build.rb', line 5 def initialize status @status = status end |
Instance Method Details
#name ⇒ Object
9 10 11 |
# File 'lib/billd/build.rb', line 9 def name Nokogiri.parse(@status).children.attribute('name').value end |
#outcome ⇒ Object
13 14 15 16 17 18 |
# File 'lib/billd/build.rb', line 13 def outcome outcome = :success! outcome = :failure! if @status[%Q{lastBuildStatus="Failure"}] outcome = :building! if @status[%Q{activity="Building"}] outcome end |
#to_s ⇒ Object
20 21 22 |
# File 'lib/billd/build.rb', line 20 def to_s "#{name}: #{outcome.to_s.capitalize}" end |