Class: EmergeCLI::Commands::Upload::ClientLibraries::Default

Inherits:
Object
  • Object
show all
Defined in:
lib/commands/upload/snapshots/client_libraries/default.rb

Instance Method Summary collapse

Constructor Details

#initialize(image_paths) ⇒ Default

Returns a new instance of Default.



6
7
8
# File 'lib/commands/upload/snapshots/client_libraries/default.rb', line 6

def initialize(image_paths)
  @image_paths = image_paths
end

Instance Method Details

#image_filesObject



10
11
12
# File 'lib/commands/upload/snapshots/client_libraries/default.rb', line 10

def image_files
  @image_paths.flat_map { |path| Dir.glob("#{path}/**/*.png") }
end

#parse_file_info(image_path) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/commands/upload/snapshots/client_libraries/default.rb', line 14

def parse_file_info(image_path)
  file_name = File.basename(image_path)
  {
    file_name:,
    group_name: File.basename(image_path, '.*'),
    variant_name: nil
  }
end