Class: SampleDataDump::Commands::DownloadCompressedSampleDataDumps

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

Instance Method Summary collapse

Constructor Details

#initialize(local_file_system_gateway, compressed_dump_storage_gateway) ⇒ DownloadCompressedSampleDataDumps

Returns a new instance of DownloadCompressedSampleDataDumps.



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

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

Instance Method Details

#resultObject



11
12
13
14
15
16
17
18
# File 'lib/sample_data_dump/commands/download_compressed_sample_data_dumps.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