Class: Yoda::Store::Actions::ImportCoreLibrary

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dep) ⇒ ImportCoreLibrary

Returns a new instance of ImportCoreLibrary.

Parameters:

  • dep (Project::Dependency::Core)


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

def initialize(dep)
  @dep = dep
end

Instance Attribute Details

#depProject::Dependency::Core (readonly)

Returns:

  • (Project::Dependency::Core)


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

def dep
  @dep
end

Class Method Details

.run(dep) ⇒ Objects::Patch

Parameters:

  • dep (Project::Dependency::Core)

Returns:



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

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

Instance Method Details

#runObjects::Patch

Returns:



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

def run
  BuildCoreIndex.run unless BuildCoreIndex.exists?
  return unless File.exist?(dep.doc_path)
  patch = YardImporter.import(dep.doc_path)
  Transformers::CoreVisibility.transform(patch)
end