Class: Hexx::CLI::Base::File Private
- Inherits:
-
Object
- Object
- Hexx::CLI::Base::File
- Defined in:
- lib/hexx/cli/base/file.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 a file from a source path to the target folder
- 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, source, target, options = {}) ⇒ Hexx::Processors::File
private
Constructs the processor for given scaffolder, source and target paths.
Instance Method Summary collapse
-
#copy(source_file) ⇒ self
private
Makes a copy of given source file.
-
#new(scaffolder, source, target, options = {}) ⇒ Hexx::Processors::File
Constructs the processor for given scaffolder, source and target paths.
Class Method Details
.initialize(scaffolder, source, target, options = {}) ⇒ Hexx::Processors::File
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, source and target paths
33 34 35 36 37 38 |
# File 'lib/hexx/cli/base/file.rb', line 33 def initialize(scaffolder, source, target, = {}) @__scaffolder__ = scaffolder @source = source @target = target @options = end |
Instance Method Details
#copy(source_file) ⇒ 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.
Makes a copy of given source file
45 46 47 48 49 50 |
# File 'lib/hexx/cli/base/file.rb', line 45 def copy(source_file) @source_file = source_file __scaffolder__.send(copy_method, source_path, target_path, ) self end |
#new(scaffolder, source, target, options = {}) ⇒ Hexx::Processors::File
Constructs the processor for given scaffolder, source and target paths
33 34 35 36 37 38 |
# File 'lib/hexx/cli/base/file.rb', line 33 def initialize(scaffolder, source, target, = {}) @__scaffolder__ = scaffolder @source = source @target = target @options = end |