Class: Yoda::Store::Project::Dependency
- Inherits:
-
Object
- Object
- Yoda::Store::Project::Dependency
- Defined in:
- lib/yoda/store/project/dependency.rb
Defined Under Namespace
Classes: Builder
Instance Attribute Summary collapse
-
#project ⇒ Object
readonly
Returns the value of attribute project.
Instance Method Summary collapse
- #autoload_gems ⇒ Array<Objects::Library::Gem>
- #builder ⇒ Builder
- #core ⇒ Objects::Library::Core
- #gem_dependency(name:, version:) ⇒ Library?
-
#initialize(project) ⇒ Dependency
constructor
A new instance of Dependency.
- #loadable_gems ⇒ Array<Objects::Library::Gem>
- #std ⇒ Objects::Library::Std
Constructor Details
#initialize(project) ⇒ Dependency
Returns a new instance of Dependency.
10 11 12 |
# File 'lib/yoda/store/project/dependency.rb', line 10 def initialize(project) @project = project end |
Instance Attribute Details
#project ⇒ Object (readonly)
Returns the value of attribute project.
7 8 9 |
# File 'lib/yoda/store/project/dependency.rb', line 7 def project @project end |
Instance Method Details
#autoload_gems ⇒ Array<Objects::Library::Gem>
20 21 22 |
# File 'lib/yoda/store/project/dependency.rb', line 20 def autoload_gems builder.autoload_gems end |
#builder ⇒ Builder
42 43 44 |
# File 'lib/yoda/store/project/dependency.rb', line 42 def builder @builder ||= Builder.new(project) end |
#core ⇒ Objects::Library::Core
32 33 34 |
# File 'lib/yoda/store/project/dependency.rb', line 32 def core @core ||= Objects::Library.core end |
#gem_dependency(name:, version:) ⇒ Library?
27 28 29 |
# File 'lib/yoda/store/project/dependency.rb', line 27 def gem_dependency(name:, version:) libraries.find { |library| library.name == name && library.version == version } end |
#loadable_gems ⇒ Array<Objects::Library::Gem>
15 16 17 |
# File 'lib/yoda/store/project/dependency.rb', line 15 def loadable_gems builder.loadable_gems end |
#std ⇒ Objects::Library::Std
37 38 39 |
# File 'lib/yoda/store/project/dependency.rb', line 37 def std @std ||= Objects::Library.std end |