Class: Omnizip::Models::ProgressOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/omnizip/models/progress_options.rb

Overview

Model representing progress tracking options.

This class encapsulates configuration for progress tracking, including reporter type, update interval, and display preferences.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeProgressOptions

Returns a new instance of ProgressOptions.



17
18
19
20
21
22
23
24
# File 'lib/omnizip/models/progress_options.rb', line 17

def initialize
  @reporter = "auto"
  @update_interval = 0.5
  @show_rate = true
  @show_eta = true
  @show_files = true
  @show_bytes = true
end

Instance Attribute Details

#reporterObject

Returns the value of attribute reporter.



14
15
16
# File 'lib/omnizip/models/progress_options.rb', line 14

def reporter
  @reporter
end

#show_bytesObject

Returns the value of attribute show_bytes.



14
15
16
# File 'lib/omnizip/models/progress_options.rb', line 14

def show_bytes
  @show_bytes
end

#show_etaObject

Returns the value of attribute show_eta.



14
15
16
# File 'lib/omnizip/models/progress_options.rb', line 14

def show_eta
  @show_eta
end

#show_filesObject

Returns the value of attribute show_files.



14
15
16
# File 'lib/omnizip/models/progress_options.rb', line 14

def show_files
  @show_files
end

#show_rateObject

Returns the value of attribute show_rate.



14
15
16
# File 'lib/omnizip/models/progress_options.rb', line 14

def show_rate
  @show_rate
end

#update_intervalObject

Returns the value of attribute update_interval.



14
15
16
# File 'lib/omnizip/models/progress_options.rb', line 14

def update_interval
  @update_interval
end

Instance Method Details

#to_hObject



26
27
28
29
30
31
32
33
34
35
# File 'lib/omnizip/models/progress_options.rb', line 26

def to_h
  {
    reporter: @reporter,
    update_interval: @update_interval,
    show_rate: @show_rate,
    show_eta: @show_eta,
    show_files: @show_files,
    show_bytes: @show_bytes,
  }.compact
end