Class: SampleDataDump::Commands::DumpSampleDataToFilesAndCompress

Inherits:
Object
  • Object
show all
Defined in:
lib/sample_data_dump/commands/dump_sample_data_to_files_and_compress.rb

Instance Method Summary collapse

Constructor Details

#initialize(local_file_system_gateway, data_store_gateway) ⇒ DumpSampleDataToFilesAndCompress

Returns a new instance of DumpSampleDataToFilesAndCompress.



6
7
8
9
# File 'lib/sample_data_dump/commands/dump_sample_data_to_files_and_compress.rb', line 6

def initialize(local_file_system_gateway, data_store_gateway)
  @local_file_system_gateway = local_file_system_gateway
  @data_store_gateway = data_store_gateway
end

Instance Method Details

#resultObject



11
12
13
14
15
16
17
18
# File 'lib/sample_data_dump/commands/dump_sample_data_to_files_and_compress.rb', line 11

def result
  @local_file_system_gateway.clean_dump_directory.bind do
    @local_file_system_gateway.load_table_configurations.fmap do |table_configs|
      result = process_table_configs_list(table_configs)
      return result if result.failure?
    end
  end
end