Class: PushbulletRuby::Push
- Inherits:
-
Entity
- Object
- Entity
- PushbulletRuby::Push
show all
- Defined in:
- lib/pushbullet_ruby/push.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_response(response) ⇒ Object
5
6
7
8
9
10
|
# File 'lib/pushbullet_ruby/push.rb', line 5
def self.from_response(response)
response.body['pushes'].each_with_object([]) do |attributes, memo|
next unless attributes['active']
memo << new(attributes)
end
end
|
Instance Method Details
#id ⇒ Object
12
13
14
|
# File 'lib/pushbullet_ruby/push.rb', line 12
def id
body['iden']
end
|
#type ⇒ Object
16
17
18
|
# File 'lib/pushbullet_ruby/push.rb', line 16
def type
body['type']
end
|