Module: Happy::Controller::Configurable
- Extended by:
- ActiveSupport::Concern
- Included in:
- Happy::Controller
- Defined in:
- lib/happy/controller/configurable.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#set(k, v) ⇒ Object
Change a setting on this controller instance.
-
#settings ⇒ Object
Return a hash containing this controller instance’s settings.
Instance Method Details
#set(k, v) ⇒ Object
Change a setting on this controller instance.
14 15 16 |
# File 'lib/happy/controller/configurable.rb', line 14 def set(k, v) settings[k.to_sym] = v end |
#settings ⇒ Object
Return a hash containing this controller instance’s settings.
8 9 10 |
# File 'lib/happy/controller/configurable.rb', line 8 def settings @settings ||= self.class.settings.dup end |