class Dynorm::Item

Public Class Methods

new(table_config, attrs) click to toggle source
# File lib/dynorm/item.rb, line 5
def initialize(table_config, attrs)
  @table_config = table_config
  @attrs = attrs

  @attrs.keys.each do |key|
    self.class.define_method(key) { @attrs[key] }
  end
end

Public Instance Methods

update_attributes(items) click to toggle source
# File lib/dynorm/item.rb, line 14
def update_attributes(items)
  @attrs = @attrs.merge(items)
  update_attribute_params
end