Sha256: ee6e233e038e62463a62387b6daa8ce43b93effb1e91c0e14c03ef8aab56d6b3

Contents?: true

Size: 367 Bytes

Versions: 22

Compression:

Stored size: 367 Bytes

Contents

require 'backup/file_item/local'
require 'backup/file_item/cloud'

module Backup
  module FileItem
    def self.for(type, *args)
      case type
        when :cloud
          Backup::FileItem::Cloud.new *args
        when :local
          Backup::FileItem::Local.new

        else
          puts_fail "Unknown '#{type}' type for FileItem"
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
encbs-0.2.5.1 lib/backup/file_item.rb
encbs-0.2.5 lib/backup/file_item.rb
encbs-0.2.4.6 lib/backup/file_item.rb
encbs-0.2.4.5 lib/backup/file_item.rb
encbs-0.2.4.4 lib/backup/file_item.rb
encbs-0.2.4.3 lib/backup/file_item.rb
encbs-0.2.4.2 lib/backup/file_item.rb
encbs-0.2.4.1 lib/backup/file_item.rb
encbs-0.2.4 lib/backup/file_item.rb
encbs-0.2.3 lib/backup/file_item.rb
encbs-0.2.2 lib/backup/file_item.rb
encbs-0.2.1 lib/backup/file_item.rb
encbs-0.2.1.beta2 lib/backup/file_item.rb
encbs-0.2.1.beta1 lib/backup/file_item.rb
encbs-0.2.1.alpha lib/backup/file_item.rb
encbs-0.2.0.alpha lib/backup/file_item.rb
encbs-0.1.3 lib/backup/file_item.rb
encbs-0.1.2 lib/backup/file_item.rb
encbs-0.1.1 lib/backup/file_item.rb
encbs-0.1.0 lib/backup/file_item.rb