Class: Ci::BuildDependencies

Inherits:
Object
  • Object
show all
Includes:
Gitlab::Utils::StrongMemoize
Defined in:
app/models/ci/build_dependencies.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(processable) ⇒ BuildDependencies

Returns a new instance of BuildDependencies.



9
10
11
# File 'app/models/ci/build_dependencies.rb', line 9

def initialize(processable)
  @processable = processable
end

Instance Attribute Details

#processableObject (readonly)

Returns the value of attribute processable.



7
8
9
# File 'app/models/ci/build_dependencies.rb', line 7

def processable
  @processable
end

Instance Method Details

#allObject



13
14
15
# File 'app/models/ci/build_dependencies.rb', line 13

def all
  (local + cross_pipeline + cross_project).uniq
end

#invalid_localObject



17
18
19
# File 'app/models/ci/build_dependencies.rb', line 17

def invalid_local
  local.reject(&:valid_dependency?)
end

#valid?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'app/models/ci/build_dependencies.rb', line 21

def valid?
  valid_local? && valid_cross_pipeline? && valid_cross_project?
end