Module: ActiveFiles
- Defined in:
- lib/active_files.rb
Defined Under Namespace
Modules: Record Classes: FileNotFound, NoFileId
Constant Summary collapse
- VERSION =
:stopdoc:
'0.1.0'
- LIBPATH =
::File.(::File.dirname(__FILE__)) + ::File::SEPARATOR
- PATH =
::File.dirname(LIBPATH) + ::File::SEPARATOR
- @@base_dir =
nil
- @@ext =
'.yaml'
Class Method Summary collapse
-
.base_dir ⇒ Object
Accessor! Find out your ActiveFiles directory.
-
.base_dir=(dir) ⇒ Object
This should definitely be used right off the bat, like so:.
-
.ext ⇒ Object
Accessor! Get your ActiveFiles file extension.
-
.ext=(ext) ⇒ Object
Probably never used, but you can change the default ActiveFiles extension, which is “.yaml”.
-
.version ⇒ Object
:startdoc:.
Class Method Details
.base_dir ⇒ Object
Accessor! Find out your ActiveFiles directory.
36 37 38 |
# File 'lib/active_files.rb', line 36 def self.base_dir @@base_dir end |
.base_dir=(dir) ⇒ Object
This should definitely be used right off the bat, like so:
ActiveFiles.base_dir = '/dir/where/I/store/files'
This is where all your ActiveFiles files will be loaded from and saved to.
30 31 32 33 |
# File 'lib/active_files.rb', line 30 def self.base_dir=(dir) FileUtils.mkdir_p dir @@base_dir = dir end |
.ext ⇒ Object
Accessor! Get your ActiveFiles file extension.
47 48 49 |
# File 'lib/active_files.rb', line 47 def self.ext @@ext end |
.ext=(ext) ⇒ Object
Probably never used, but you can change the default ActiveFiles extension, which is “.yaml”.
42 43 44 |
# File 'lib/active_files.rb', line 42 def self.ext=(ext) @@ext = ext end |
.version ⇒ Object
:startdoc:
17 18 19 |
# File 'lib/active_files.rb', line 17 def self.version VERSION end |