Method: Megam::Request#from_hash

Defined in:
lib/megam/core/request.rb

#from_hash(o) ⇒ Object



158
159
160
161
162
163
164
165
166
167
168
# File 'lib/megam/core/request.rb', line 158

def from_hash(o)
  @id = o[:id] if o.has_key?(:id)
  @account_id = o[:account_id] if o.has_key?(:account_id)
  @cat_id  = o[:cat_id] if o.has_key?(:cat_id)
  @name = o[:name] if o.has_key?(:name)
  @cattype = o[:cattype] if o.has_key?(:cattype)
  @action = o[:action] if o.has_key?(:action)
  @category = o[:category] if o.has_key?(:category)
  @created_at = o[:created_at] if o.has_key?(:created_at)
  self
end