Class: NPM2Gem::FileCopier
- Inherits:
-
Object
- Object
- NPM2Gem::FileCopier
- Defined in:
- lib/npm2gem/file_copier.rb
Instance Method Summary collapse
- #copy(input_paths) ⇒ Object
-
#initialize(from_base, to_base) ⇒ FileCopier
constructor
A new instance of FileCopier.
Constructor Details
#initialize(from_base, to_base) ⇒ FileCopier
Returns a new instance of FileCopier.
5 6 7 8 |
# File 'lib/npm2gem/file_copier.rb', line 5 def initialize(from_base, to_base) @from_base = from_base @to_base = to_base end |
Instance Method Details
#copy(input_paths) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/npm2gem/file_copier.rb', line 10 def copy(input_paths) input_paths.each do |input_path| # TODO: replace with polymorphism, for the love of god if input_path.is_a?(Hash) copy_to_subfolder(input_path) else copy_single(input_path) end end end |