lib/pushbullet_ruby/push.rb in pushbullet_ruby-1.0.1 vs lib/pushbullet_ruby/push.rb in pushbullet_ruby-1.0.2

- old
+ new

@@ -1,8 +1,15 @@ require 'pushbullet_ruby/entity' module PushbulletRuby class Push < Entity + def self.from_response(response) + response.body['pushes'].each_with_object([]) do |push, memo| + next unless push['active'] + memo << new(push) + end + end + def id body['iden'] end def type \ No newline at end of file