Sha256: e0d5f07002200ad2c1a1c23a67d7ea15f25fde851543aed16eb5ba182dd8e498
Contents?: true
Size: 490 Bytes
Versions: 10
Compression:
Stored size: 490 Bytes
Contents
require 'pushbullet_ruby/entity' require 'pushbullet_ruby/api/chats' module PushbulletRuby class Chat < Entity def self.from_response(response) response.body['chats'].each_with_object([]) do |attributes, memo| next unless attributes['active'] memo << new(attributes) end end def update(client: nil, params: {}) client.update_chat(chat_id: self.id, params: params) end def id body['iden'] end end end
Version data entries
10 entries across 9 versions & 2 rubygems