Class: Pocky::PackwerkLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/pocky/packwerk_loader.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(root_path, package_paths) ⇒ PackwerkLoader

Returns a new instance of PackwerkLoader.



10
11
12
13
14
# File 'lib/pocky/packwerk_loader.rb', line 10

def initialize(root_path, package_paths)
  @root_path = root_path
  @package_paths = package_paths
  @packages = {}
end

Class Method Details

.load(root_path, package_paths) ⇒ Object



5
6
7
# File 'lib/pocky/packwerk_loader.rb', line 5

def self.load(root_path, package_paths)
  new(root_path, package_paths).load
end

Instance Method Details

#loadObject



16
17
18
19
20
21
# File 'lib/pocky/packwerk_loader.rb', line 16

def load
  load_primary_packages
  load_secondary_packages

  @packages
end