Class: Cjoiner::Engines::Joiner
- Defined in:
- lib/cjoiner/engines/joiner.rb
Overview
join files
Instance Attribute Summary
Attributes inherited from Engine
Instance Method Summary collapse
-
#initialize(opts) ⇒ Joiner
constructor
A new instance of Joiner.
Methods inherited from Engine
Methods included from Helpers::Files
#delete_file, #expand_path, #file, #file_exists, #load_yaml, #move_file, #on_windows, #read_file, #temp_file, #write_file
Constructor Details
#initialize(opts) ⇒ Joiner
Returns a new instance of Joiner.
5 6 7 8 9 10 11 |
# File 'lib/cjoiner/engines/joiner.rb', line 5 def initialize(opts) output = "" opts[:files].each do |file| output << read_file(file) << "\n" end @engine = output end |