Sha256: e6c36ae48a1c7abcd5bde82bc1a43c60c59623444038719e7b0a07da1849f585

Contents?: true

Size: 356 Bytes

Versions: 2

Compression:

Stored size: 356 Bytes

Contents

require 'pushbullet_ruby/entity'

module PushbulletRuby
  class Push < Entity
    def self.from_response(response)
      response.body['pushes'].map do |attributes|
        next unless attributes['active']
        new(attributes)
      end
    end

    def id
      body['iden']
    end

    def type
      body['type']
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pushbullet_ruby-1.0.3 lib/pushbullet_ruby/push.rb
pushbullet_ruby-1.0.2.1 lib/pushbullet_ruby/push.rb