Module: Persistence::Object::Flat::File::FilePersistence
- Extended by:
- FilePersistence
- Includes:
- CascadingConfiguration::Setting
- Included in:
- Persistence, ClassInstance, FilePersistence, ObjectInstance, Port::Bucket::BucketInterface, Port::PortInterface
- Defined in:
- lib/persistence/object/flat/file/file_persistence.rb
Overview
Common module used for look-up chain for file persistence configuration.
Lookup chain is: File instance, File class, Persistence::Port::Bucket instance, Persistence::Port instance,
Persistence singleton.
Instance Method Summary collapse
-
#persist_files_by_content! ⇒ Object
(also: #persists_files_by_content!)
Declare that files should be persisted by contents (rather than by path).
-
#persist_files_by_path! ⇒ Object
Declare that files should be persisted by path (rather than by contents).
-
#persists_file_paths_as_strings? ⇒ true, false
(also: #persist_file_paths_as_strings?)
Query whether File paths should be persisted as strings (rather than by objects).
-
#persists_files_by_content? ⇒ true, false
Query whether File instances should be persisted by content (rather than by path).
-
#persists_files_by_path? ⇒ true, false
Query whether File instances should be persisted by path (rather than by content).
Instance Method Details
#persist_files_by_content! ⇒ Object Also known as: persists_files_by_content!
Declare that files should be persisted by contents (rather than by path).
87 88 89 90 91 92 93 94 |
# File 'lib/persistence/object/flat/file/file_persistence.rb', line 87 def persist_files_by_content! self.persist_files_by_content = true self.persist_files_by_path = false return self end |
#persist_files_by_path! ⇒ Object
Declare that files should be persisted by path (rather than by contents).
71 72 73 74 75 76 77 78 |
# File 'lib/persistence/object/flat/file/file_persistence.rb', line 71 def persist_files_by_path! self.persist_files_by_path = true self.persist_files_by_content = false return self end |
#persists_file_paths_as_strings? ⇒ true, false Also known as: persist_file_paths_as_strings?
Query whether File paths should be persisted as strings (rather than by objects).
Lookup chain is: File instance, File class, Persistence::Port::Bucket instance, Persistence::Port instance,
Persistence singleton.
59 |
# File 'lib/persistence/object/flat/file/file_persistence.rb', line 59 attr_setting :persists_file_paths_as_strings? => :persists_file_paths_as_strings= |
#persists_files_by_content? ⇒ true, false
Query whether File instances should be persisted by content (rather than by path).
Lookup chain is: File instance, File class, Persistence::Port::Bucket instance, Persistence::Port instance,
Persistence singleton.
27 |
# File 'lib/persistence/object/flat/file/file_persistence.rb', line 27 attr_setting :persists_files_by_content? => :persist_files_by_content= |
#persists_files_by_path? ⇒ true, false
Query whether File instances should be persisted by path (rather than by content).
Lookup chain is: File instance, File class, Persistence::Port::Bucket instance, Persistence::Port instance,
Persistence singleton.
43 |
# File 'lib/persistence/object/flat/file/file_persistence.rb', line 43 attr_setting :persists_files_by_path? => :persist_files_by_path= |