Class: Dropdown::OutputStores::DropboxStore

Inherits:
Object
  • Object
show all
Defined in:
lib/dropdown/output_stores/dropbox_store.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(output_path) ⇒ DropboxStore

Returns a new instance of DropboxStore.



8
9
10
# File 'lib/dropdown/output_stores/dropbox_store.rb', line 8

def initialize(output_path)
  @output_path = output_path
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



6
7
8
# File 'lib/dropdown/output_stores/dropbox_store.rb', line 6

def path
  @path
end

Instance Method Details

#save(contents, file_name) ⇒ Object



12
13
14
15
# File 'lib/dropdown/output_stores/dropbox_store.rb', line 12

def save(contents, file_name)
  @path = File.join @output_path, file_name
  client.put_file(@path, contents, true)
end