Class: DBPurger::Config
- Inherits:
-
Object
- Object
- DBPurger::Config
- Defined in:
- lib/db-purger/config.rb
Overview
DBPurger::Config keeps track of global config options for the purge process
Constant Summary collapse
- DEFAULT_DATETIME_FORMAT =
'%Y-%m-%d %H:%M:%S'
Instance Attribute Summary collapse
- #datetime_format ⇒ Object
-
#explain ⇒ Object
writeonly
Sets the attribute explain.
- #explain_file ⇒ Object
Instance Method Summary collapse
Instance Attribute Details
#datetime_format ⇒ Object
20 21 22 |
# File 'lib/db-purger/config.rb', line 20 def datetime_format @datetime_format || DEFAULT_DATETIME_FORMAT end |
#explain=(value) ⇒ Object (writeonly)
Sets the attribute explain
8 9 10 |
# File 'lib/db-purger/config.rb', line 8 def explain=(value) @explain = value end |
#explain_file ⇒ Object
16 17 18 |
# File 'lib/db-purger/config.rb', line 16 def explain_file (@explain_file || $stdout) end |
Instance Method Details
#explain? ⇒ Boolean
12 13 14 |
# File 'lib/db-purger/config.rb', line 12 def explain? @explain == true end |