Class: Dokkit::Environment::Helper::ExtMap

Inherits:
FileSelection show all
Defined in:
lib/dokkit/environment/helpers/extmap.rb

Instance Attribute Summary

Attributes inherited from FileSelection

#base_dir, #excludes, #includes

Instance Method Summary collapse

Methods inherited from FileSelection

#exclude, #files, #include

Constructor Details

#initialize(base_dir) ⇒ ExtMap

Returns a new instance of ExtMap.



15
16
17
18
# File 'lib/dokkit/environment/helpers/extmap.rb', line 15

def initialize(base_dir)
  super(base_dir)
  @ext = { }
end

Instance Method Details

#[](resource) ⇒ Object



23
24
25
# File 'lib/dokkit/environment/helpers/extmap.rb', line 23

def [](resource)
  @ext[resource]
end

#map(&blk) ⇒ Object



19
20
21
22
# File 'lib/dokkit/environment/helpers/extmap.rb', line 19

def map(&blk)
  files.each { |fn| @ext[fn] = blk }
  self
end