Class: Yoda::Store::Actions::ImportStdLibrary

Inherits:
Object
  • Object
show all
Defined in:
lib/yoda/store/actions/import_std_library.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dep) ⇒ ImportStdLibrary

Returns a new instance of ImportStdLibrary.

Parameters:

  • dep (Project::Dependency::Std)


17
18
19
# File 'lib/yoda/store/actions/import_std_library.rb', line 17

def initialize(dep)
  @dep = dep
end

Instance Attribute Details

#depProject::Dependency::Std (readonly)

Returns:

  • (Project::Dependency::Std)


6
7
8
# File 'lib/yoda/store/actions/import_std_library.rb', line 6

def dep
  @dep
end

Class Method Details

.run(dep) ⇒ Objects::Patch

Parameters:

  • dep (Project::Dependency::Std)

Returns:



11
12
13
# File 'lib/yoda/store/actions/import_std_library.rb', line 11

def run(dep)
  new(dep).run
end

Instance Method Details

#runObjects::Patch

Returns:



22
23
24
25
26
# File 'lib/yoda/store/actions/import_std_library.rb', line 22

def run
  BuildCoreIndex.run unless BuildCoreIndex.exists?
  return false unless File.exist?(dep.doc_path)
  YardImporter.import(dep.doc_path)
end