Module: Omelettes::ModelAdditions::ClassMethods
- Defined in:
- lib/omelettes/model_additions.rb
Instance Method Summary collapse
- #column_config(column_name) ⇒ Object
- #ignore(column_name) ⇒ Object (also: #harden)
- #treat(column_name, style = nil, &block) ⇒ Object (also: #scramble)
Instance Method Details
#column_config(column_name) ⇒ Object
4 5 6 7 |
# File 'lib/omelettes/model_additions.rb', line 4 def column_config(column_name) @column_config ||= {} @column_config[column_name.to_s] end |
#ignore(column_name) ⇒ Object Also known as: harden
17 18 19 20 21 22 |
# File 'lib/omelettes/model_additions.rb', line 17 def ignore(column_name) @column_config ||= {} column = Column.new(column_name, :hardened) @column_config[column_name.to_s] = column column end |
#treat(column_name, style = nil, &block) ⇒ Object Also known as: scramble
9 10 11 12 13 14 |
# File 'lib/omelettes/model_additions.rb', line 9 def treat(column_name, style=nil, &block) @column_config ||= {} column = Column.new(column_name, style, &block) @column_config[column_name.to_s] = column column end |