Method: Megam::Credits#from_hash

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

#from_hash(o) ⇒ Object



108
109
110
111
112
113
114
# File 'lib/megam/core/credits.rb', line 108

def from_hash(o)
    @id        = o[:id] if o.has_key?(:id)
    @account_id = o[:account_id] if o.has_key?(:account_id)
    @credit   = o[:credit] if o.has_key?(:credit)
    @created_at   = o[:created_at] if o.has_key?(:created_at)
    self
end