Class: Awestruct::Extensions::Pipeline
- Inherits:
-
Object
- Object
- Awestruct::Extensions::Pipeline
- Defined in:
- lib/awestruct/extensions/pipeline.rb
Instance Attribute Summary (collapse)
-
- (Object) after_extensions
readonly
Returns the value of attribute after_extensions.
-
- (Object) before_extensions
readonly
Returns the value of attribute before_extensions.
-
- (Object) extensions
readonly
Returns the value of attribute extensions.
-
- (Object) helpers
readonly
Returns the value of attribute helpers.
-
- (Object) transformers
readonly
Returns the value of attribute transformers.
Instance Method Summary (collapse)
- - (Object) execute(site)
- - (Object) extension(ext)
- - (Object) helper(helper)
-
- (Pipeline) initialize(&block)
constructor
A new instance of Pipeline.
- - (Object) transformer(transformer)
- - (Object) watch(watched_dirs)
Constructor Details
- (Pipeline) initialize(&block)
A new instance of Pipeline
11 12 13 14 15 16 |
# File 'lib/awestruct/extensions/pipeline.rb', line 11 def initialize(&block) @extensions = [] @helpers = [] @transformers = [] instance_eval &block if block end |
Instance Attribute Details
- (Object) after_extensions (readonly)
Returns the value of attribute after_extensions
7 8 9 |
# File 'lib/awestruct/extensions/pipeline.rb', line 7 def after_extensions @after_extensions end |
- (Object) before_extensions (readonly)
Returns the value of attribute before_extensions
5 6 7 |
# File 'lib/awestruct/extensions/pipeline.rb', line 5 def before_extensions @before_extensions end |
- (Object) extensions (readonly)
Returns the value of attribute extensions
6 7 8 |
# File 'lib/awestruct/extensions/pipeline.rb', line 6 def extensions @extensions end |
- (Object) helpers (readonly)
Returns the value of attribute helpers
8 9 10 |
# File 'lib/awestruct/extensions/pipeline.rb', line 8 def helpers @helpers end |
- (Object) transformers (readonly)
Returns the value of attribute transformers
9 10 11 |
# File 'lib/awestruct/extensions/pipeline.rb', line 9 def transformers @transformers end |
Instance Method Details
- (Object) execute(site)
31 32 33 34 35 |
# File 'lib/awestruct/extensions/pipeline.rb', line 31 def execute(site) extensions.each do |ext| ext.execute( site ) end end |
- (Object) extension(ext)
18 19 20 21 |
# File 'lib/awestruct/extensions/pipeline.rb', line 18 def extension(ext) @extensions << ext ext.transform(@transformers) if ext.respond_to?('transform') end |
- (Object) helper(helper)
23 24 25 |
# File 'lib/awestruct/extensions/pipeline.rb', line 23 def helper(helper) @helpers << helper end |
- (Object) transformer(transformer)
27 28 29 |
# File 'lib/awestruct/extensions/pipeline.rb', line 27 def transformer(transformer) @transformers << transformer end |
- (Object) watch(watched_dirs)
37 38 39 40 41 |
# File 'lib/awestruct/extensions/pipeline.rb', line 37 def watch(watched_dirs) extensions.each do |ext| ext.watch( watched_dirs ) if ext.respond_to?('watch') end end |