Class: Hexx::CLI::Base::Folder Private
- Inherits:
-
Object
- Object
- Hexx::CLI::Base::Folder
- Defined in:
- lib/hexx/cli/base/folder.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Copies all files from a source folder to the target one
- Files, that have '.erb' extension, are pre-processed as erb templates.
- The starting "_" symbol is removed from a file name.
Class Method Summary collapse
-
.initialize(scaffolder) ⇒ Hexx::Processors::Folder
private
Constructs the processor for given scaffolder.
Instance Method Summary collapse
-
#copy(source, target, options = {}) ⇒ self
private
Copies a source folder content to the target folder.
-
#new(scaffolder) ⇒ Hexx::Processors::Folder
Constructs the processor for given scaffolder.
Class Method Details
.initialize(scaffolder) ⇒ Hexx::Processors::Folder
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Constructs the processor for given scaffolder
22 23 24 |
# File 'lib/hexx/cli/base/folder.rb', line 22 def initialize(scaffolder) @__scaffolder__ = scaffolder end |
Instance Method Details
#copy(source, target, options = {}) ⇒ self
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Copies a source folder content to the target folder
35 36 37 38 39 40 |
# File 'lib/hexx/cli/base/folder.rb', line 35 def copy(source, target, = {}) @source, @target, = source, target, source_files.each { |file| file_processor.copy(file) } self end |
#new(scaffolder) ⇒ Hexx::Processors::Folder
Constructs the processor for given scaffolder
22 23 24 |
# File 'lib/hexx/cli/base/folder.rb', line 22 def initialize(scaffolder) @__scaffolder__ = scaffolder end |