Top Level Namespace
Defined Under Namespace
Modules: Gat Classes: File, Float, GatgetDarBackup, GatgetGatgetsManager, GatgetSynchronization, Hash, LauncherForGatgetDarBackup, MyRsyncScript, String, SystemBackup
Constant Summary collapse
- GAT_ROOT =
File.(File.dirname(__FILE__) + '/..')
- GAT_SCRIPT_PATH =
File.(File.dirname($0))
- GAT_GATGETS =
Boot File provides the starting point to execute gatget based script.
Boot load required modules && classes for Gat::Base and other gems. Differents exit levels are launched if requires files fails.
Gat constants
GAT_ROOT + '/gatgets'
- GAT_TEMPLATES =
GAT_ROOT + '/templates'
- GATGET_DAR_BACKUP_ROOT =
File.(File.dirname(__FILE__))
- GATGET_GATGETS_MANAGER_ROOT =
File.(File.dirname(__FILE__))
- GATGET_SYNCHRONIZATION_ROOT =
File.(File.dirname(__FILE__))
Instance Method Summary collapse
Instance Method Details
#nice_file_size(size) ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/gat/extends.rb', line 53 def nice_file_size(size) if size >= 1073741824 filesize = "#{ (size.to_f / 1073741824.0).round_to(2) } Gb." elsif size >= 1048576 filesize = "#{ (size.to_f / 1048576.0).round_to(2) } Mb." elsif size >= 1024 filesize = "#{ (size.to_f / 1024.0).round_to(2) } Kb." else filesize = "#{ size } bytes" end filesize end |