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

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

Defined Under Namespace

Classes: Builder

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project) ⇒ Dependency

Returns a new instance of Dependency.

Parameters:



10
11
12
# File 'lib/yoda/store/project/dependency.rb', line 10

def initialize(project)
  @project = project
end

Instance Attribute Details

#projectObject (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_gemsArray<Objects::Library::Gem>

Returns:



20
21
22
# File 'lib/yoda/store/project/dependency.rb', line 20

def autoload_gems
  builder.autoload_gems
end

#builderBuilder

Returns:



42
43
44
# File 'lib/yoda/store/project/dependency.rb', line 42

def builder
  @builder ||= Builder.new(project)
end

#coreObjects::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?

Parameters:

  • name (String)
  • version (String)

Returns:

  • (Library, nil)


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_gemsArray<Objects::Library::Gem>

Returns:



15
16
17
# File 'lib/yoda/store/project/dependency.rb', line 15

def loadable_gems
  builder.loadable_gems
end

#stdObjects::Library::Std



37
38
39
# File 'lib/yoda/store/project/dependency.rb', line 37

def std
  @std ||= Objects::Library.std
end