Class: PushbulletRuby::Device
- Inherits:
-
Entity
- Object
- Entity
- PushbulletRuby::Device
show all
- Defined in:
- lib/pushbullet_ruby/device.rb
Instance Attribute Summary
Attributes inherited from Entity
#body
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Entity
#created, #initialize, #modified
Class Method Details
.from_responce(response) ⇒ Object
5
6
7
8
9
10
|
# File 'lib/pushbullet_ruby/device.rb', line 5
def self.from_responce(response)
response.body['devices'].each_with_object([]) do |attributes, memo|
next unless attributes['active']
memo << new(attributes)
end
end
|
Instance Method Details
#app_version ⇒ Object
20
21
22
|
# File 'lib/pushbullet_ruby/device.rb', line 20
def app_version
body['app_version']
end
|
#id ⇒ Object
12
13
14
|
# File 'lib/pushbullet_ruby/device.rb', line 12
def id
body['iden']
end
|
#name ⇒ Object
16
17
18
|
# File 'lib/pushbullet_ruby/device.rb', line 16
def name
body['nickname']
end
|