Class: ERB::Processor::ForDirectoryTree
- Inherits:
-
Object
- Object
- ERB::Processor::ForDirectoryTree
- Defined in:
- lib/erb/processor/for_directory_tree.rb
Overview
Orchestrate the processing of all .erb templates in tree structure
Instance Attribute Summary collapse
-
#paths ⇒ Object
readonly
Returns the value of attribute paths.
Instance Method Summary collapse
-
#initialize(paths) ⇒ ForDirectoryTree
constructor
A new instance of ForDirectoryTree.
- #run ⇒ Object
Constructor Details
#initialize(paths) ⇒ ForDirectoryTree
Returns a new instance of ForDirectoryTree.
12 13 14 |
# File 'lib/erb/processor/for_directory_tree.rb', line 12 def initialize(paths) @paths = paths end |
Instance Attribute Details
#paths ⇒ Object (readonly)
Returns the value of attribute paths.
10 11 12 |
# File 'lib/erb/processor/for_directory_tree.rb', line 10 def paths @paths end |
Instance Method Details
#run ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/erb/processor/for_directory_tree.rb', line 16 def run Find.find(*paths) do |path| next unless ForSingleFile.template_file?(path) ForSingleFile.new(path).run end end |