Method: Megam::Auth.json_create
- Defined in:
- lib/megam/core/auth.rb
.json_create(o) ⇒ Object
Create a Megam::Account from JSON (used by the backgroud job workers)
64 65 66 67 68 69 70 71 |
# File 'lib/megam/core/auth.rb', line 64 def self.json_create(o) acct = new acct.some_msg[:code] = o["code"] if o.has_key?("code") acct.some_msg[:msg_type] = o["msg_type"] if o.has_key?("msg_type") acct.some_msg[:msg]= o["msg"] if o.has_key?("msg") acct.some_msg[:links] = o["links"] if o.has_key?("links") acct end |