Class: Yoda::Store::Project::Dependency::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/yoda/store/project/dependency.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project) ⇒ Builder

Returns a new instance of Builder.

Parameters:



51
52
53
# File 'lib/yoda/store/project/dependency.rb', line 51

def initialize(project)
  @project = project
end

Instance Attribute Details

#projectProject (readonly)

Returns:



48
49
50
# File 'lib/yoda/store/project/dependency.rb', line 48

def project
  @project
end

Instance Method Details

#autoload_gemsArray<Objects::Library::Gem>

Returns:



65
66
67
68
69
# File 'lib/yoda/store/project/dependency.rb', line 65

def autoload_gems
  @autoload_gems ||= begin
    loadable_gems.select { |gem| autoload_dependency_ids.include?(gem.id) }
  end
end

#loadable_gemsArray<Objects::Library::Gem>

Returns:



56
57
58
59
60
61
62
# File 'lib/yoda/store/project/dependency.rb', line 56

def loadable_gems
  @loadable_gems ||= begin
    dependencies
      .map { |attrs| Objects::Library::Gem.new(**attrs) }
      .reject { |spec| project.config.ignored_gems.include?(spec.name) }
  end
end