Module: Uorm::Redis

Defined in:
lib/uorm/redis.rb,
lib/uorm/redis/persistance.rb

Defined Under Namespace

Classes: Persistance

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



8
9
10
11
12
13
14
15
16
17
# File 'lib/uorm/redis.rb', line 8

def self.included base
  base.instance_eval do
    field :id, type: :String
  end

  def initialize values = {}
    values[:id] ||= values['id']
    super values
  end
end

Instance Method Details

#initialize(values = {}) ⇒ Object



13
14
15
16
# File 'lib/uorm/redis.rb', line 13

def initialize values = {}
  values[:id] ||= values['id']
  super values
end