class RemoteFiles::AbstractStore
Attributes
Public Class Methods
Source
# File lib/remote_files/abstract_store.rb, line 5 def initialize(identifier) @identifier = identifier end
Public Instance Methods
Source
# File lib/remote_files/abstract_store.rb, line 13 def []=(name, value) options[name] = value end
Source
# File lib/remote_files/abstract_store.rb, line 29 def copy_to_store!(file, target_store) raise "You need to implement #{self.class.name} #copy_to_store!" end
Source
# File lib/remote_files/abstract_store.rb, line 41 def delete!(identifier) raise "You need to implement #{self.class.name}#delete!" end
Source
# File lib/remote_files/abstract_store.rb, line 21 def directory_name raise "You need to implement #{self.class.name}:#directory_name" end
Source
# File lib/remote_files/abstract_store.rb, line 61 def file_from_url(url, options = {}) matched = url_matcher.match(url) return nil unless matched file_identifier = CGI.unescape(matched[1]) RemoteFiles::File.new(file_identifier, options.merge(:stored_in => [self])) end
Source
# File lib/remote_files/abstract_store.rb, line 25 def files(prefix = '') raise "You need to implement #{self.class.name} #files" end
Source
# File lib/remote_files/abstract_store.rb, line 57 def read_delete_only? options[:read_delete_only] == true end
Source
# File lib/remote_files/abstract_store.rb, line 53 def read_only? options[:read_only] == true end
Source
# File lib/remote_files/abstract_store.rb, line 37 def retrieve!(identifier) raise "You need to implement #{self.class.name}#retrieve!" end
Source
# File lib/remote_files/abstract_store.rb, line 33 def store!(file) raise "You need to implement #{self.class.name}#store!" end
Source
# File lib/remote_files/abstract_store.rb, line 17 def to_sym @identifier.to_sym end
Source
# File lib/remote_files/abstract_store.rb, line 45 def url(identifier) raise "You need to implement #{self.class.name}#url" end
Source
# File lib/remote_files/abstract_store.rb, line 49 def url_matcher raise "You need to implement #{self.class.name}:#url_matcher" end