Class: Dropdown::OutputStores::DropboxStore
- Inherits:
-
Object
- Object
- Dropdown::OutputStores::DropboxStore
- Defined in:
- lib/dropdown/output_stores/dropbox_store.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(output_path) ⇒ DropboxStore
constructor
A new instance of DropboxStore.
- #save(contents, file_name) ⇒ Object
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
#path ⇒ Object (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 |