Classes: Base, Cloud, Local
6 7 8 9 10 11 12 13 14 15 16
# File 'lib/backup/file_item.rb', line 6 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