Module: MaglevRecord::ReadWrite

Extended by:
MaglevSupport::Concern
Included in:
Base
Defined in:
lib/maglev_record/read_write.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Methods included from MaglevSupport::Concern

included

Instance Method Details

#attributesObject



6
7
8
# File 'lib/maglev_record/read_write.rb', line 6

def attributes
  @maglev_attributes ||= Hash.new
end

#update_attributes(attribute_hash) ⇒ Object



10
11
12
13
14
15
# File 'lib/maglev_record/read_write.rb', line 10

def update_attributes(attribute_hash)
  attribute_hash.each_pair do |k,v|
    attributes[k.to_sym] = v
  end
  self
end