Module: Sequel::Plugins::ColumnConflicts::InstanceMethods

Defined in:
lib/sequel/plugins/column_conflicts.rb

Instance Method Summary collapse

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.



74
75
76
77
78
79
80
# File 'lib/sequel/plugins/column_conflicts.rb', line 74

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.



83
84
85
86
87
88
89
# File 'lib/sequel/plugins/column_conflicts.rb', line 83

def set_column_value(c, v)
  if col = model.set_column_conflicts[c]
    self[col] = v
  else
    super
  end
end