1 class Clipboard < ActiveRecord::Base
6 # Initialize clipboard object.
7 # We're starting with an empty clipboard:
8 # the @folders and @files arrays are empty too.
10 # Put given folder on clipboard
11 # unless it's already there
12 def add_folder(folder)
13 @folders << folder unless @folders.find{ |f| f.id == folder.id }
16 # Put given file on clipboard
17 # unless it's already there
19 @files << file unless @files.find{ |f| f.id == file.id }