Class: Minjector::Reader

Inherits:
Object
  • Object
show all
Defined in:
lib/minjector/reader.rb

Class Method Summary collapse

Class Method Details

.read(path) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/minjector/reader.rb', line 7

def read(path)
  names = []
  parent = Pathname.new(path)

  parent.children.each do |child|
    next unless child.directory?

    names << child.relative_path_from(parent).to_s
  end

  names
end