lib/pushbullet_ruby/device.rb in pushbullet_ruby-1.0.2 vs lib/pushbullet_ruby/device.rb in pushbullet_ruby-1.0.2.1

- old
+ new

@@ -1,12 +1,12 @@ require 'pushbullet_ruby/entity' module PushbulletRuby class Device < Entity def self.from_responce(response) - response.body['devices'].each_with_object([]) do |attributes, memo| + response.body['devices'].map do |attributes| next unless attributes['active'] - memo << new(attributes) + new(attributes) end end def id body['iden'] \ No newline at end of file