Class: EY::Backup::Engine
- Includes:
- Spawner
- Defined in:
- lib/ey_backup/engine.rb
Direct Known Subclasses
Constant Summary
Constants included from Spawner
Instance Attribute Summary collapse
-
#force ⇒ Object
readonly
Returns the value of attribute force.
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#key_id ⇒ Object
readonly
Returns the value of attribute key_id.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Class Method Summary collapse
- .descendants ⇒ Object
- .inherited(descendant) ⇒ Object
- .label ⇒ Object
- .lookup(label) ⇒ Object
- .register(label) ⇒ Object
Instance Method Summary collapse
- #gpg? ⇒ Boolean
-
#initialize(username, password, host, key_id, force) ⇒ Engine
constructor
A new instance of Engine.
Methods included from Spawner
Methods inherited from Base
Constructor Details
#initialize(username, password, host, key_id, force) ⇒ Engine
Returns a new instance of Engine.
29 30 31 |
# File 'lib/ey_backup/engine.rb', line 29 def initialize(username, password, host, key_id, force) @username, @password, @host, @key_id, @force = username, password, host, key_id, force end |
Instance Attribute Details
#force ⇒ Object (readonly)
Returns the value of attribute force.
6 7 8 |
# File 'lib/ey_backup/engine.rb', line 6 def force @force end |
#host ⇒ Object (readonly)
Returns the value of attribute host.
6 7 8 |
# File 'lib/ey_backup/engine.rb', line 6 def host @host end |
#key_id ⇒ Object (readonly)
Returns the value of attribute key_id.
6 7 8 |
# File 'lib/ey_backup/engine.rb', line 6 def key_id @key_id end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
6 7 8 |
# File 'lib/ey_backup/engine.rb', line 6 def password @password end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
6 7 8 |
# File 'lib/ey_backup/engine.rb', line 6 def username @username end |
Class Method Details
.descendants ⇒ Object
16 17 18 |
# File 'lib/ey_backup/engine.rb', line 16 def self.descendants @descendants ||= [] end |
.inherited(descendant) ⇒ Object
20 21 22 |
# File 'lib/ey_backup/engine.rb', line 20 def self.inherited(descendant) descendants << descendant end |
.label ⇒ Object
8 9 10 |
# File 'lib/ey_backup/engine.rb', line 8 def self.label @label end |
.lookup(label) ⇒ Object
24 25 26 27 |
# File 'lib/ey_backup/engine.rb', line 24 def self.lookup(label) descendants.detect {|d| d.label == label } || EY::Backup.logger.fatal("Unknown database engine: #{label}") end |
.register(label) ⇒ Object
12 13 14 |
# File 'lib/ey_backup/engine.rb', line 12 def self.register(label) @label = label end |
Instance Method Details
#gpg? ⇒ Boolean
33 34 35 |
# File 'lib/ey_backup/engine.rb', line 33 def gpg? !key_id.nil? && key_id != "" end |