Class: ConcourseJob
- Inherits:
-
Object
- Object
- ConcourseJob
- Defined in:
- lib/preflight_check/concourse_job.rb
Instance Attribute Summary collapse
-
#dependencies ⇒ Object
Returns the value of attribute dependencies.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name:, dependencies:) ⇒ ConcourseJob
constructor
A new instance of ConcourseJob.
- #mark_as_failed ⇒ Object
- #missing_dependencies ⇒ Object
- #success? ⇒ Boolean
Constructor Details
#initialize(name:, dependencies:) ⇒ ConcourseJob
Returns a new instance of ConcourseJob.
3 4 5 6 7 |
# File 'lib/preflight_check/concourse_job.rb', line 3 def initialize(name:, dependencies:) @name = name @dependencies = dependencies @success = true end |
Instance Attribute Details
#dependencies ⇒ Object
Returns the value of attribute dependencies.
2 3 4 |
# File 'lib/preflight_check/concourse_job.rb', line 2 def dependencies @dependencies end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/preflight_check/concourse_job.rb', line 2 def name @name end |
Instance Method Details
#mark_as_failed ⇒ Object
9 10 11 |
# File 'lib/preflight_check/concourse_job.rb', line 9 def mark_as_failed @success = false end |
#missing_dependencies ⇒ Object
17 18 19 |
# File 'lib/preflight_check/concourse_job.rb', line 17 def missing_dependencies dependencies.reject(&:defined?) end |
#success? ⇒ Boolean
13 14 15 |
# File 'lib/preflight_check/concourse_job.rb', line 13 def success? @success end |