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

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

#settingsObject

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