Module Dister::Utils
In: lib/dister/utils.rb

Shared utility methods

Methods

Constants

GIGA_SIZE = 1073741824.0
MEGA_SIZE = 1048576.0
KILO_SIZE = 1024.0

Public Instance methods

Shows message and prints a dot per second until the block code terminates its execution. Exceptions raised by the block are displayed and program exists with error status 1.

@param [Number] size Size to be converted @param [Number] precision Number of decimals desired

@return [String] Return the file size with a readable style.

[Validate]