Class: HLS::Directory
- Inherits:
-
Object
- Object
- HLS::Directory
- Defined in:
- lib/hls.rb
Instance Method Summary collapse
- #glob(glob) ⇒ Object
-
#initialize(source) ⇒ Directory
constructor
A new instance of Directory.
Constructor Details
#initialize(source) ⇒ Directory
Returns a new instance of Directory.
198 199 200 |
# File 'lib/hls.rb', line 198 def initialize(source) @source = Pathname.new(source) end |
Instance Method Details
#glob(glob) ⇒ Object
202 203 204 205 206 207 208 209 210 |
# File 'lib/hls.rb', line 202 def glob(glob) Enumerator.new do |y| @source.glob(glob).each do |input| relative = input.relative_path_from(@source) output = relative.dirname.join(relative.basename(input.extname)) y << [ input, output ] end end end |