class Yoda::Store::Actions::ReadFile
Attributes
file[R]
@return [String]
registry[R]
@return [Registry]
Public Class Methods
new(registry, file, root_path: nil)
click to toggle source
@param registry [Registry] @param file [String]
# File lib/yoda/store/actions/read_file.rb, line 20 def initialize(registry, file, root_path: nil) @registry = registry @file = file @root_path = root_path end
run(registry, file, root_path: nil)
click to toggle source
@param registry [Registry] @param file [String] @return [void]
# File lib/yoda/store/actions/read_file.rb, line 14 def self.run(registry, file, root_path: nil) self.new(registry, file, root_path: root_path).run end
Public Instance Methods
run()
click to toggle source
@return [void]
# File lib/yoda/store/actions/read_file.rb, line 27 def run YARD::Registry.clear YARD.parse([file]) patch = YardImporter.new(file).import(YARD::Registry.all + [YARD::Registry.root]).patch registry.add_patch(patch) end