Module: Sequel::Plugins::ColumnConflicts::InstanceMethods
- Defined in:
- lib/sequel/plugins/column_conflicts.rb
Instance Method Summary collapse
-
#get_column_value(c) ⇒ Object
If the given column has a getter method conflict, lookup the value directly in the values hash.
-
#set_column_value(c, v) ⇒ Object
If the given column has a setter method conflict, set the value directly in the values hash.
Instance Method Details
#get_column_value(c) ⇒ Object
If the given column has a getter method conflict, lookup the value directly in the values hash.
89 90 91 92 93 94 95 |
# File 'lib/sequel/plugins/column_conflicts.rb', line 89 def get_column_value(c) if col = model.get_column_conflicts[c] self[col] else super end end |
#set_column_value(c, v) ⇒ Object
If the given column has a setter method conflict, set the value directly in the values hash.
98 99 100 101 102 103 104 |
# File 'lib/sequel/plugins/column_conflicts.rb', line 98 def set_column_value(c, v) if col = model.set_column_conflicts[c] self[col] = v else super end end |