@@ -33,14 +33,14 @@ def initialize(options = {}) # rubocop:disable Metrics/AbcSize
3333 self . timer = Timer . new ( options )
3434 self . progressable = Progress . new ( options )
3535
36- options = options . merge ( :timer => timer ,
37- :progress => progressable )
36+ options = options . merge ( :progress => progressable ,
37+ :timer => timer )
3838
3939 self . title_component = Components ::Title . new ( options )
4040 self . bar_component = Components ::Bar . new ( options )
4141 self . percentage_component = Components ::Percentage . new ( options )
4242 self . rate_component = Components ::Rate . new ( options )
43- self . time = Components ::Time . new ( options )
43+ self . time_component = Components ::Time . new ( options )
4444
4545 self . output = Output . detect ( options . merge ( :bar => self ) )
4646 @format = Format ::String . new ( output . resolve_format ( options [ :format ] ) )
@@ -146,8 +146,8 @@ def to_h
146146 'progress' => progressable . progress ,
147147 'total' => progressable . total ,
148148 'percentage' => progressable . percentage_completed_with_precision . to_f ,
149- 'elapsed_time_in_seconds' => time . __send__ ( :timer ) . elapsed_seconds ,
150- 'estimated_time_remaining_in_seconds' => time . __send__ ( :estimated_seconds_remaining ) ,
149+ 'elapsed_time_in_seconds' => time_component . __send__ ( :timer ) . elapsed_seconds ,
150+ 'estimated_time_remaining_in_seconds' => time_component . __send__ ( :estimated_seconds_remaining ) ,
151151 'base_rate_of_change' => rate_component . __send__ ( :base_rate ) ,
152152 'scaled_rate_of_change' => rate_component . __send__ ( :scaled_rate ) ,
153153 'unknown_progress_animation_steps' => bar_component . upa_steps ,
@@ -180,7 +180,7 @@ def format=(other)
180180 :bar_component ,
181181 :percentage_component ,
182182 :rate_component ,
183- :time ,
183+ :time_component ,
184184 :autostart ,
185185 :autofinish ,
186186 :finished
0 commit comments