Class: WebTranslateIt::Safe::Backup
- Inherits:
-
Object
- Object
- WebTranslateIt::Safe::Backup
- Defined in:
- lib/web_translate_it/safe/backup.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
Returns the value of attribute command.
-
#compressed ⇒ Object
Returns the value of attribute compressed.
-
#extension ⇒ Object
Returns the value of attribute extension.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#id ⇒ Object
Returns the value of attribute id.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#path ⇒ Object
Returns the value of attribute path.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Backup
constructor
A new instance of Backup.
- #run(config, *mods) ⇒ Object
Constructor Details
#initialize(opts = {}) ⇒ Backup
Returns a new instance of Backup.
9 10 11 12 13 |
# File 'lib/web_translate_it/safe/backup.rb', line 9 def initialize(opts = {}) opts.each do |k, v| send("#{k}=", v) end end |
Instance Attribute Details
#command ⇒ Object
Returns the value of attribute command.
7 8 9 |
# File 'lib/web_translate_it/safe/backup.rb', line 7 def command @command end |
#compressed ⇒ Object
Returns the value of attribute compressed.
7 8 9 |
# File 'lib/web_translate_it/safe/backup.rb', line 7 def compressed @compressed end |
#extension ⇒ Object
Returns the value of attribute extension.
7 8 9 |
# File 'lib/web_translate_it/safe/backup.rb', line 7 def extension @extension end |
#filename ⇒ Object
Returns the value of attribute filename.
7 8 9 |
# File 'lib/web_translate_it/safe/backup.rb', line 7 def filename @filename end |
#id ⇒ Object
Returns the value of attribute id.
7 8 9 |
# File 'lib/web_translate_it/safe/backup.rb', line 7 def id @id end |
#kind ⇒ Object
Returns the value of attribute kind.
7 8 9 |
# File 'lib/web_translate_it/safe/backup.rb', line 7 def kind @kind end |
#path ⇒ Object
Returns the value of attribute path.
7 8 9 |
# File 'lib/web_translate_it/safe/backup.rb', line 7 def path @path end |
#timestamp ⇒ Object
Returns the value of attribute timestamp.
7 8 9 |
# File 'lib/web_translate_it/safe/backup.rb', line 7 def @timestamp end |
Instance Method Details
#run(config, *mods) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/web_translate_it/safe/backup.rb', line 15 def run(config, *mods) mods.each do |mod| mod = mod.to_s mod[0] = mod[0..0].upcase WebTranslateIt::Safe.const_get(mod).new(config, self).process end end |