Sha256: 41dc26eb22fe860a6615df7d3ff5056e34b651548bdb31a1341772c643f6bbc4

Contents?: true

Size: 811 Bytes

Versions: 5

Compression:

Stored size: 811 Bytes

Contents

module EY
  module Backup
    class Engine < Base
      include Spawner

      attr_reader :username, :password, :host, :key_id, :force

      def self.label
        @label
      end

      def self.register(label)
        @label = label
      end

      def self.descendants
        @descendants ||= []
      end

      def self.inherited(descendant)
        descendants << descendant
      end

      def self.lookup(label)
        descendants.detect {|d| d.label == label } ||
          EY::Backup.logger.fatal("Unknown database engine: #{label}")
      end

      def initialize(username, password, host, key_id, force)
        @username, @password, @host, @key_id, @force  = username, password, host, key_id, force
      end

      def gpg?
        !key_id.nil? && key_id != ""
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ey_cloud_server-1.4.58 lib/ey_backup/engine.rb
ey_cloud_server-1.4.54 lib/ey_backup/engine.rb
ey_cloud_server-1.4.51 lib/ey_backup/engine.rb
ey_cloud_server-1.4.50 lib/ey_backup/engine.rb
ey_cloud_server-1.4.49 lib/ey_backup/engine.rb