Class: AgileNotifier::CI::Job
- Inherits:
-
Object
- Object
- AgileNotifier::CI::Job
- Defined in:
- lib/agile_notifier/ci.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Build
Instance Attribute Summary collapse
-
#current_build ⇒ Object
readonly
Returns the value of attribute current_build.
-
#name ⇒ Object
Returns the value of attribute name.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #get_last_build ⇒ Object
- #get_specific_build(build_number) ⇒ Object
-
#initialize(name, url, build_number = nil) ⇒ Job
constructor
A new instance of Job.
Constructor Details
#initialize(name, url, build_number = nil) ⇒ Job
Returns a new instance of Job.
23 24 25 26 27 |
# File 'lib/agile_notifier/ci.rb', line 23 def initialize(name, url, build_number = nil) @name = name @url = url @current_build = build_number.nil? ? get_last_build : get_specific_build(build_number.to_i) end |
Instance Attribute Details
#current_build ⇒ Object (readonly)
Returns the value of attribute current_build.
21 22 23 |
# File 'lib/agile_notifier/ci.rb', line 21 def current_build @current_build end |
#name ⇒ Object
Returns the value of attribute name.
20 21 22 |
# File 'lib/agile_notifier/ci.rb', line 20 def name @name end |
#url ⇒ Object
Returns the value of attribute url.
20 21 22 |
# File 'lib/agile_notifier/ci.rb', line 20 def url @url end |
Instance Method Details
#get_last_build ⇒ Object
33 34 35 |
# File 'lib/agile_notifier/ci.rb', line 33 def get_last_build raise(NotImplementedError, "Abstract method [#{__method__}] is called, please implement", caller) end |
#get_specific_build(build_number) ⇒ Object
29 30 31 |
# File 'lib/agile_notifier/ci.rb', line 29 def get_specific_build(build_number) raise(NotImplementedError, "Abstract method [#{__method__}] is called, please implement", caller) end |