Module: Backup::Config::Helpers::ClassMethods
- Defined in:
- lib/backup/config/helpers.rb
Instance Method Summary collapse
-
#clear_defaults! ⇒ Object
Used only within the specs.
- #defaults ⇒ Object
- #deprecations ⇒ Object
- #log_deprecation_warning(name, deprecation) ⇒ Object
Instance Method Details
#clear_defaults! ⇒ Object
Used only within the specs
22 23 24 |
# File 'lib/backup/config/helpers.rb', line 22 def clear_defaults! defaults.reset! end |
#defaults ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/backup/config/helpers.rb', line 11 def defaults @defaults ||= Config::Defaults.new if block_given? yield @defaults else @defaults end end |
#deprecations ⇒ Object
26 27 28 |
# File 'lib/backup/config/helpers.rb', line 26 def deprecations @deprecations ||= {} end |
#log_deprecation_warning(name, deprecation) ⇒ Object
30 31 32 33 34 35 36 37 38 |
# File 'lib/backup/config/helpers.rb', line 30 def log_deprecation_warning(name, deprecation) msg = "#{self}##{name} has been deprecated as of " \ "backup v.#{deprecation[:version]}" msg << "\n#{deprecation[:message]}" if deprecation[:message] Logger.warn Config::Error.new(<<-EOS) [DEPRECATION WARNING] #{msg} EOS end |