Sha256: dd66fc91d37e13c05d8ffa408c742630d11d4c2f931fa41d927e52a29bb34b78
Contents?: true
Size: 608 Bytes
Versions: 10
Compression:
Stored size: 608 Bytes
Contents
require 'pushbullet_ruby/entity' require 'pushbullet_ruby/api/devices' module PushbulletRuby class Device < Entity def self.from_responce(response) response.body['devices'].each_with_object([]) do |attributes, memo| next unless attributes['active'] memo << new(attributes) end end def update(client: nil, params: {}) client.update_device(device_id: self.id, params: params) end def id body['iden'] end def name body['nickname'] end def app_version body['app_version'] end end end
Version data entries
10 entries across 9 versions & 2 rubygems