Class: Utils::RegularFileConverter
- Defined in:
- lib/bujo/utils/converter.rb
Instance Method Summary collapse
Methods inherited from Converter
Instance Method Details
#convert ⇒ Object
25 26 27 28 29 30 |
# File 'lib/bujo/utils/converter.rb', line 25 def convert source_relative_path = Pathname.new(File.(@source_path)).relative_path_from(Pathname.new(Configuration::Structure.sources_path)) target_path = File.join(Configuration::Structure.targets_path, source_relative_path.to_s) puts "Converting #{@source_path} to #{target_path}..." if Configuration::Globals.verbose FileUtils.copy_file(@source_path, target_path) end |