lib/pushbullet_ruby/api/subscriptions.rb in pushbullet_ruby-1.0.1 vs lib/pushbullet_ruby/api/subscriptions.rb in pushbullet_ruby-1.0.2

- old
+ new

@@ -10,14 +10,12 @@ def channel_info(tag) PushbulletRuby::Channel.new(get('/v2/channel-info', tag: tag).body) end def recent_pushes(tag) - pushes = [] - channel_info(tag).body['recent_pushes'].each do |push| - pushes << PushbulletRuby::Push.new(push) + channel_info(tag).body['recent_pushes'].each_with_object([]) do |push, memo| + memo << PushbulletRuby::Push.new(push) end - pushes end end end end \ No newline at end of file