Module: Tynn::Settings::ClassMethods
- Defined in:
- lib/tynn/settings.rb
Instance Method Summary collapse
-
#inherited(subclass) ⇒ Object
Internal: Copies settings into the subclass.
-
#settings ⇒ Object
Returns a Hash with the application settings.
Instance Method Details
#inherited(subclass) ⇒ Object
Internal: Copies settings into the subclass. If a setting is not found, checks parent’s settings.
39 40 41 42 |
# File 'lib/tynn/settings.rb', line 39 def inherited(subclass) subclass.settings.replace(Tynn::Settings.deepclone(settings)) subclass.settings.default_proc = proc { |h, k| h[k] = settings[k] } end |