Class: ConcourseJob

Inherits:
Object
  • Object
show all
Defined in:
lib/preflight_check/concourse_job.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dependenciesObject

Returns the value of attribute dependencies.



2
3
4
# File 'lib/preflight_check/concourse_job.rb', line 2

def dependencies
  @dependencies
end

#nameObject

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_failedObject



9
10
11
# File 'lib/preflight_check/concourse_job.rb', line 9

def mark_as_failed
  @success = false
end

#missing_dependenciesObject



17
18
19
# File 'lib/preflight_check/concourse_job.rb', line 17

def missing_dependencies
  dependencies.reject(&:defined?)
end

#success?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/preflight_check/concourse_job.rb', line 13

def success?
  @success
end