Class: WebTranslateIt::Safe::Backup

Inherits:
Object
  • Object
show all
Defined in:
lib/web_translate_it/safe/backup.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#commandObject

Returns the value of attribute command.



7
8
9
# File 'lib/web_translate_it/safe/backup.rb', line 7

def command
  @command
end

#compressedObject

Returns the value of attribute compressed.



7
8
9
# File 'lib/web_translate_it/safe/backup.rb', line 7

def compressed
  @compressed
end

#extensionObject

Returns the value of attribute extension.



7
8
9
# File 'lib/web_translate_it/safe/backup.rb', line 7

def extension
  @extension
end

#filenameObject

Returns the value of attribute filename.



7
8
9
# File 'lib/web_translate_it/safe/backup.rb', line 7

def filename
  @filename
end

#idObject

Returns the value of attribute id.



7
8
9
# File 'lib/web_translate_it/safe/backup.rb', line 7

def id
  @id
end

#kindObject

Returns the value of attribute kind.



7
8
9
# File 'lib/web_translate_it/safe/backup.rb', line 7

def kind
  @kind
end

#pathObject

Returns the value of attribute path.



7
8
9
# File 'lib/web_translate_it/safe/backup.rb', line 7

def path
  @path
end

#timestampObject

Returns the value of attribute timestamp.



7
8
9
# File 'lib/web_translate_it/safe/backup.rb', line 7

def timestamp
  @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