Class: DBPurger::Config

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Instance Attribute Details

#datetime_formatObject



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

Parameters:

  • value

    the value to set the attribute explain to.



8
9
10
# File 'lib/db-purger/config.rb', line 8

def explain=(value)
  @explain = value
end

#explain_fileObject



16
17
18
# File 'lib/db-purger/config.rb', line 16

def explain_file
  (@explain_file || $stdout)
end

Instance Method Details

#explain?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/db-purger/config.rb', line 12

def explain?
  @explain == true
end