Class: Cifrado::Progressbar
- Inherits:
-
Object
- Object
- Cifrado::Progressbar
- Includes:
- Utils
- Defined in:
- lib/cifrado/cli/progressbar.rb
Instance Method Summary collapse
- #block ⇒ Object
-
#initialize(segments, current_segment, options = {}) ⇒ Progressbar
constructor
A new instance of Progressbar.
Methods included from Utils
#calculate_chunks, #clean_object_name, #decrypt_filename, #encrypt_filename, #humanize_bytes, #mime_type, #prettify_backtrace, #unix_time
Constructor Details
#initialize(segments, current_segment, options = {}) ⇒ Progressbar
Returns a new instance of Progressbar.
5 6 7 8 9 |
# File 'lib/cifrado/cli/progressbar.rb', line 5 def initialize(segments, current_segment, = {}) @style = ([:style] || :fancy).to_sym @segments = segments @current_segment = current_segment end |
Instance Method Details
#block ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/cifrado/cli/progressbar.rb', line 11 def block if @style == :fancy fancy elsif @style == :fast fast elsif @style == :infinite infinite else nil end end |