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.



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

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.



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

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