class Syncbox::Store
Constants
- STORES
Public Class Methods
new(store, options={})
click to toggle source
Initializes a store object
@param [String] store @param [HASH] options
# File lib/syncbox/store.rb, line 13 def initialize(store, options={}) raise ArgumentError, "Store #{store} is not supported." unless STORES.fetch(store) class_name = STORES[store] @store = Object.const_get("Syncbox").const_get(class_name).new(options) end
Public Instance Methods
add(file_path)
click to toggle source
Add file to store.
@param [String] file_path
@return a public (not authenticated) URL for the object
# File lib/syncbox/store.rb, line 25 def add(file_path) @store.upload(file_path) end
Also aliased as: modify
delete(file_path)
click to toggle source
delete file from store.
@param [String] file_path
@return nil
# File lib/syncbox/store.rb, line 35 def delete(file_path) @store.delete(file_path) end