Class: Dependence::Concatenator
- Inherits:
-
Object
- Object
- Dependence::Concatenator
- Defined in:
- lib/dependence/concatenator.rb
Overview
Take a load path + file glob and concat them into 1 file per directory
Constant Summary collapse
- @@defaults =
{ :load_path => ".", :source_type => "**/*{#{Compiler.supported_extensions.join(',')}}" }
Instance Method Summary collapse
- #concat(&block) ⇒ Object
-
#initialize(opts = {}) ⇒ Concatenator
constructor
A new instance of Concatenator.
Constructor Details
#initialize(opts = {}) ⇒ Concatenator
12 13 14 |
# File 'lib/dependence/concatenator.rb', line 12 def initialize(opts = {}) @options = @@defaults.merge(opts) end |
Instance Method Details
#concat(&block) ⇒ Object
16 17 18 |
# File 'lib/dependence/concatenator.rb', line 16 def concat(&block) get_dirs.each { |dir| concat_module(dir, &block) } end |