Class: PushbulletRuby::Chat
- Inherits:
-
Entity
- Object
- Entity
- PushbulletRuby::Chat
show all
- Defined in:
- lib/pushbullet_ruby/chat.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
6
7
8
9
10
11
|
# File 'lib/pushbullet_ruby/chat.rb', line 6
def self.from_response(response)
response.body['chats'].each_with_object([]) do |attributes, memo|
next unless attributes['active']
memo << new(attributes)
end
end
|
Instance Method Details
#id ⇒ Object
17
18
19
|
# File 'lib/pushbullet_ruby/chat.rb', line 17
def id
body['iden']
end
|
#update(client: nil, params: {}) ⇒ Object
13
14
15
|
# File 'lib/pushbullet_ruby/chat.rb', line 13
def update(client: nil, params: {})
client.update_chat(chat_id: self.id, params: params)
end
|