class Yoda::Store::Actions::ImportStdLibrary

Attributes

registry[R]

@return [Registry]

Public Class Methods

new(registry) click to toggle source
# File lib/yoda/store/actions/import_std_library.rb, line 15
def initialize(registry)
  @registry = registry
end
run(registry) click to toggle source

@return [true, false]

# File lib/yoda/store/actions/import_std_library.rb, line 10
def run(registry)
  new(registry).run
end

Public Instance Methods

run() click to toggle source

@return [true, false]

# File lib/yoda/store/actions/import_std_library.rb, line 20
def run
  return false unless File.exist?(doc_path)
  patch = YardImporter.import(doc_path)
  registry.add_patch(patch)
  true
end

Private Instance Methods

doc_path() click to toggle source
# File lib/yoda/store/actions/import_std_library.rb, line 29
def doc_path
  File.expand_path("~/.yoda/sources/ruby-#{RUBY_VERSION}/.yardoc-stdlib")
end