Module: BaseAttributes::ClassMethods
- Included in:
- BaseAttributes
- Defined in:
- lib/modules/base_attributes.rb
Instance Method Summary collapse
Instance Method Details
#common_setter(*setters) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/modules/base_attributes.rb', line 4 def common_setter(*setters) setters.each do |set| define_method("#{set}=") do |val| if val && set != val self.instance_variable_set("@#{set}",val) clear_minimal_height end end end end |