Module: SettingCrazy::InstanceMethods
- Defined in:
- lib/settingcrazy/instance_methods.rb
Instance Method Summary collapse
- #assign_attributes(values, options = {}) ⇒ Object
- #settings ⇒ Object
- #settings=(attributes) ⇒ Object
Instance Method Details
#assign_attributes(values, options = {}) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/settingcrazy/instance_methods.rb', line 4 def assign_attributes(values, = {}) if values.has_key?(:settings) self.settings = values.delete(:settings) end super(values, ) end |
#settings ⇒ Object
12 13 14 |
# File 'lib/settingcrazy/instance_methods.rb', line 12 def settings @settings ||= SettingsProxy.new(self, self.class.setting_template(self)) end |
#settings=(attributes) ⇒ Object
16 17 18 |
# File 'lib/settingcrazy/instance_methods.rb', line 16 def settings=(attributes) settings.bulk_assign(attributes) end |