Module: Safeguard
- Defined in:
- lib/safeguard.rb,
lib/safeguard/digest.rb,
lib/safeguard/hasher.rb,
lib/safeguard/output.rb,
lib/safeguard/worker.rb,
lib/safeguard/command.rb,
lib/safeguard/version.rb,
lib/safeguard/verifier.rb,
lib/safeguard/repository.rb,
lib/safeguard/command/add.rb,
lib/safeguard/command/hash.rb,
lib/safeguard/command/init.rb,
lib/safeguard/digest/crc32.rb,
lib/safeguard/core_ext/file.rb,
lib/safeguard/command/verify.rb,
lib/safeguard/core_ext/module.rb,
lib/safeguard/output/terminal.rb,
lib/safeguard/command/add/hash.rb,
lib/safeguard/repository/hash_table.rb
Overview
Safeguard module.
Defined Under Namespace
Modules: CoreExt, Digest, Output, Version Classes: Command, Hasher, Repository, Verifier, Worker
Class Method Summary collapse
-
.i18n ⇒ Object
Directory where translations are kept.
- .initialize_i18n ⇒ Object
-
.root ⇒ Object
Where the Safeguard installation is located.
-
.run(*args) ⇒ Object
Run a command by name with the given arguments.
-
.translation_files ⇒ Object
Array of translation files.
-
.version ⇒ Object
Returns the version of Safeguard.
Class Method Details
.i18n ⇒ Object
Directory where translations are kept.
25 26 27 |
# File 'lib/safeguard.rb', line 25 def i18n File.join root, 'i18n' end |
.initialize_i18n ⇒ Object
34 35 36 |
# File 'lib/safeguard.rb', line 34 def initialize_i18n I18n.load_path = translation_files end |
.root ⇒ Object
Where the Safeguard installation is located.
20 21 22 |
# File 'lib/safeguard.rb', line 20 def root File. '../..', __FILE__ end |
.run(*args) ⇒ Object
Run a command by name with the given arguments.
9 10 11 12 |
# File 'lib/safeguard.rb', line 9 def run(*args) initialize_i18n Command.run *args end |
.translation_files ⇒ Object
Array of translation files.
30 31 32 |
# File 'lib/safeguard.rb', line 30 def translation_files Dir[File.join(i18n, '*')] end |