Class: Bickle::Build
- Inherits:
-
Object
- Object
- Bickle::Build
- Defined in:
- lib/bickle/build.rb
Instance Method Summary collapse
- #branch ⇒ Object
- #commit ⇒ Object
- #duration ⇒ Object
- #event_type ⇒ Object
- #fail? ⇒ Boolean
- #finished_at ⇒ Object
- #id ⇒ Object
-
#initialize(build) ⇒ Build
constructor
A new instance of Build.
- #message ⇒ Object
- #number ⇒ Object
- #pass? ⇒ Boolean
- #pending? ⇒ Boolean
- #repository_id ⇒ Object
- #result ⇒ Object
- #started_at ⇒ Object
- #state ⇒ Object
Constructor Details
#initialize(build) ⇒ Build
Returns a new instance of Build.
3 4 5 |
# File 'lib/bickle/build.rb', line 3 def initialize(build) @build = build end |
Instance Method Details
#branch ⇒ Object
43 44 45 |
# File 'lib/bickle/build.rb', line 43 def branch @build["branch"] end |
#commit ⇒ Object
39 40 41 |
# File 'lib/bickle/build.rb', line 39 def commit @build["commit"] end |
#duration ⇒ Object
35 36 37 |
# File 'lib/bickle/build.rb', line 35 def duration @build["duration"] end |
#event_type ⇒ Object
51 52 53 |
# File 'lib/bickle/build.rb', line 51 def event_type @build["event_type"] end |
#fail? ⇒ Boolean
59 60 61 |
# File 'lib/bickle/build.rb', line 59 def fail? result == 1 end |
#finished_at ⇒ Object
31 32 33 |
# File 'lib/bickle/build.rb', line 31 def finished_at @build["finished_at"] end |
#id ⇒ Object
7 8 9 |
# File 'lib/bickle/build.rb', line 7 def id @build["id"] end |
#message ⇒ Object
47 48 49 |
# File 'lib/bickle/build.rb', line 47 def = @build["message"] end |
#number ⇒ Object
15 16 17 |
# File 'lib/bickle/build.rb', line 15 def number @build["number"] end |
#pass? ⇒ Boolean
55 56 57 |
# File 'lib/bickle/build.rb', line 55 def pass? result == 0 end |
#pending? ⇒ Boolean
63 64 65 |
# File 'lib/bickle/build.rb', line 63 def pending? result == nil end |
#repository_id ⇒ Object
11 12 13 |
# File 'lib/bickle/build.rb', line 11 def repository_id @build["repository_id"] end |
#result ⇒ Object
23 24 25 |
# File 'lib/bickle/build.rb', line 23 def result @build["result"] end |
#started_at ⇒ Object
27 28 29 |
# File 'lib/bickle/build.rb', line 27 def started_at @build["started_at"] end |
#state ⇒ Object
19 20 21 |
# File 'lib/bickle/build.rb', line 19 def state @build["state"] end |