Class: Omnizip::Models::ProgressOptions
- Inherits:
-
Object
- Object
- Omnizip::Models::ProgressOptions
- 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
-
#reporter ⇒ Object
Returns the value of attribute reporter.
-
#show_bytes ⇒ Object
Returns the value of attribute show_bytes.
-
#show_eta ⇒ Object
Returns the value of attribute show_eta.
-
#show_files ⇒ Object
Returns the value of attribute show_files.
-
#show_rate ⇒ Object
Returns the value of attribute show_rate.
-
#update_interval ⇒ Object
Returns the value of attribute update_interval.
Instance Method Summary collapse
-
#initialize ⇒ ProgressOptions
constructor
A new instance of ProgressOptions.
- #to_h ⇒ Object
Constructor Details
#initialize ⇒ ProgressOptions
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
#reporter ⇒ Object
Returns the value of attribute reporter.
14 15 16 |
# File 'lib/omnizip/models/progress_options.rb', line 14 def reporter @reporter end |
#show_bytes ⇒ Object
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_eta ⇒ Object
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_files ⇒ Object
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_rate ⇒ Object
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_interval ⇒ Object
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_h ⇒ Object
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 |