Class: RequirejsOptimizer::Build
- Inherits:
-
Object
- Object
- RequirejsOptimizer::Build
- Defined in:
- lib/requirejs_optimizer/build.rb
Instance Attribute Summary collapse
-
#steps ⇒ Object
Returns the value of attribute steps.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Build
constructor
A new instance of Build.
- #run ⇒ Object
- #step(name) ⇒ Object
Constructor Details
#initialize(*args) ⇒ Build
Returns a new instance of Build.
7 8 9 |
# File 'lib/requirejs_optimizer/build.rb', line 7 def initialize(*args) @steps = args.inject({}) { |m, s| m[s.name] = s.new; m } end |
Instance Attribute Details
#steps ⇒ Object
Returns the value of attribute steps.
5 6 7 |
# File 'lib/requirejs_optimizer/build.rb', line 5 def steps @steps end |
Instance Method Details
#run ⇒ Object
11 12 13 |
# File 'lib/requirejs_optimizer/build.rb', line 11 def run @steps.each { |s| s.last.perform } end |
#step(name) ⇒ Object
15 16 17 |
# File 'lib/requirejs_optimizer/build.rb', line 15 def step(name) @steps[name] end |