Module: Notebook
- Defined in:
- lib/notebook.rb,
lib/notebook/version.rb,
lib/notebook/attachment.rb,
lib/notebook/rails/engine.rb,
lib/notebook/storage_adapters.rb,
lib/notebook/rails/active_record.rb,
lib/notebook/storage_adapters/s3.rb,
lib/notebook/storage_adapters/base.rb,
lib/notebook/storage_adapters/filesystem.rb
Defined Under Namespace
Modules: ActiveRecordAttachment, StorageAdapters Classes: Attachment, Engine
Constant Summary collapse
- VERSION =
'0.2.0'
Class Method Summary collapse
-
.adapter ⇒ Object
Return the current storage adapter in use.
-
.adapter=(adapter) ⇒ Object
Set the storage adapter constant (ex: Notebook::StorageAdapters::Filesystem) to use.
-
.public_directory ⇒ Object
Return the current filesystem storage directory in use.
-
.public_directory=(directory) ⇒ Object
Set the storage filesystem directory to use.
-
.s3_options ⇒ Object
Return the current S3 options.
-
.s3_options=(s3_options) ⇒ Object
Allow the user to specify S3 options.
Class Method Details
.adapter ⇒ Object
Return the current storage adapter in use
11 12 13 |
# File 'lib/notebook.rb', line 11 def self.adapter @adapter || Notebook::StorageAdapters::Filesystem end |
.adapter=(adapter) ⇒ Object
Set the storage adapter constant (ex: Notebook::StorageAdapters::Filesystem) to use
16 17 18 |
# File 'lib/notebook.rb', line 16 def self.adapter=(adapter) @adapter = adapter end |
.public_directory ⇒ Object
Return the current filesystem storage directory in use
21 22 23 |
# File 'lib/notebook.rb', line 21 def self.public_directory @public_directory || (Pathname.pwd + 'public') end |
.public_directory=(directory) ⇒ Object
Set the storage filesystem directory to use
26 27 28 |
# File 'lib/notebook.rb', line 26 def self.public_directory=(directory) @public_directory = directory end |
.s3_options ⇒ Object
Return the current S3 options
6 7 8 |
# File 'lib/notebook/storage_adapters/s3.rb', line 6 def self. @s3_options || {} end |
.s3_options=(s3_options) ⇒ Object
Allow the user to specify S3 options
11 12 13 |
# File 'lib/notebook/storage_adapters/s3.rb', line 11 def self.() @s3_options = end |