module FromHash

Public Class Methods

new(ops={}) click to toggle source
# File lib/mongo_persist/util.rb, line 45
def initialize(ops={})
  from_hash(ops)
  after_initialize
end

Public Instance Methods

after_initialize() click to toggle source
# File lib/mongo_persist/util.rb, line 49
def after_initialize
end
from_hash(ops) click to toggle source
# File lib/mongo_persist/util.rb, line 39
def from_hash(ops)
  ops.each do |k,v|
    send("#{k}=",v)
  end
  self
end