Module: Pushybullet::Concerns::FromHash

Included in:
Types::Device, Types::Push, Types::PushRequest
Defined in:
lib/pushybullet/concerns.rb

Instance Method Summary collapse

Instance Method Details

#from_hash(data) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/pushybullet/concerns.rb', line 6

def from_hash(data)
  o = new
  data.each do |key, value|
    o.send("#{key}=", value)
  end

  o
end