Object
# File lib/ruby-progressbar/components/bar.rb, line 15 def initialize(options = {}) super self.unknown_progress_animation_steps = options[:unknown_progress_animation_steps] || DEFAULT_UNKNOWN_PROGRESS_ANIMATION_STEPS self.progress_mark = options[:progress_mark] || DEFAULT_PROGRESS_MARK self.remainder_mark = options[:remainder_mark] || DEFAULT_REMAINDER_MARK end
# File lib/ruby-progressbar/components/bar.rb, line 39 def empty_string incomplete_length = (length - completed_length) if total.nil? current_animation_step = progress % unknown_progress_animation_steps.size animation_graphic = unknown_progress_animation_steps[current_animation_step] unknown_incomplete_string = animation_graphic * ((incomplete_length / unknown_progress_animation_steps.size) + 2) unknown_incomplete_string[0, incomplete_length] else remainder_mark * incomplete_length end end
# File lib/ruby-progressbar/components/bar.rb, line 29 def integrated_percentage_complete_string return standard_complete_string if completed_length < 5 " #{percentage_completed} ".to_s.center(completed_length, progress_mark) end
Generated with the Darkfish Rdoc Generator 2.