Class: Writefully::Tools::Pigeon

Inherits:
Object
  • Object
show all
Includes:
Celluloid
Defined in:
lib/writefully/tools/pigeon.rb

Instance Method Summary collapse

Instance Method Details

#remove(key) ⇒ Object



13
14
15
16
17
# File 'lib/writefully/tools/pigeon.rb', line 13

def remove key
  Writefully::Storage.remove_file(key)
rescue StandardError => e
  nil
end

#upload(endpoint, path, name) ⇒ Object



6
7
8
9
10
11
# File 'lib/writefully/tools/pigeon.rb', line 6

def upload endpoint, path, name
  file = File.open(File.join(path, name))
  Writefully::Storage.store_file(File.join(endpoint, name), file)
rescue StandardError => e
  nil
end