Class: AMEE::Db::BaseConfig
- Inherits:
-
Object
- Object
- AMEE::Db::BaseConfig
- Defined in:
- lib/amee/db/config.rb
Overview
Direct Known Subclasses
Instance Attribute Summary collapse
-
#storage_method ⇒ Object
readonly
Returns the value of attribute storage_method.
Instance Method Summary collapse
-
#initialize ⇒ BaseConfig
constructor
A new instance of BaseConfig.
- #store_everything? ⇒ Boolean
- #store_metadata? ⇒ Boolean
- #store_outputs? ⇒ Boolean
Constructor Details
#initialize ⇒ BaseConfig
Returns a new instance of BaseConfig.
20 21 22 23 |
# File 'lib/amee/db/config.rb', line 20 def initialize # Default is metadata @storage_method = load_storage_method || :metadata end |
Instance Attribute Details
#storage_method ⇒ Object (readonly)
Returns the value of attribute storage_method.
25 26 27 |
# File 'lib/amee/db/config.rb', line 25 def storage_method @storage_method end |
Instance Method Details
#store_everything? ⇒ Boolean
35 36 37 |
# File 'lib/amee/db/config.rb', line 35 def store_everything? [:everything].include? storage_method end |
#store_metadata? ⇒ Boolean
27 28 29 |
# File 'lib/amee/db/config.rb', line 27 def [:metadata, :outputs, :everything].include? storage_method end |
#store_outputs? ⇒ Boolean
31 32 33 |
# File 'lib/amee/db/config.rb', line 31 def store_outputs? [:outputs, :everything].include? storage_method end |