Class: Yoda::Store::Project::Dependency::Builder
- Inherits:
-
Object
- Object
- Yoda::Store::Project::Dependency::Builder
- Defined in:
- lib/yoda/store/project/dependency.rb
Instance Attribute Summary collapse
- #project ⇒ Project readonly
Instance Method Summary collapse
- #autoload_gems ⇒ Array<Objects::Library::Gem>
-
#initialize(project) ⇒ Builder
constructor
A new instance of Builder.
- #loadable_gems ⇒ Array<Objects::Library::Gem>
Constructor Details
#initialize(project) ⇒ Builder
Returns a new instance of Builder.
51 52 53 |
# File 'lib/yoda/store/project/dependency.rb', line 51 def initialize(project) @project = project end |
Instance Attribute Details
#project ⇒ Project (readonly)
48 49 50 |
# File 'lib/yoda/store/project/dependency.rb', line 48 def project @project end |
Instance Method Details
#autoload_gems ⇒ Array<Objects::Library::Gem>
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_gems ⇒ Array<Objects::Library::Gem>
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 |