Sha256: 35b527bb92de16716f82832b80a6ed47dd35a951f8c5bb9c553d4a38c9058353
Contents?: true
Size: 726 Bytes
Versions: 11
Compression:
Stored size: 726 Bytes
Contents
require_relative "transformer/in_memory" require_relative "transformer/temp_table" module DirectoryDiff class Transform attr_reader :current_directory def initialize(current_directory) @current_directory = current_directory end def into(new_directory, options = {}) processor_class = processor_for(options[:processor]) processor_class.new(current_directory).into(new_directory, options) end private def processor_for(processor) case processor when nil, :in_memory Transformer::InMemory when :temp_table Transformer::TempTable else raise ArgumentError, "unsupported processor #{processor.inspect}" end end end end
Version data entries
11 entries across 11 versions & 1 rubygems