lib/hanzo/heroku.rb in hanzo-0.4.2 vs lib/hanzo/heroku.rb in hanzo-0.4.3
- old
+ new
@@ -1,17 +1,15 @@
module Hanzo
module Heroku
class << self
-
def available_labs
- Hanzo.run("heroku labs").each_line.to_a.inject([]) do |memo, line|
+ Hanzo.run('heroku labs').each_line.to_a.reduce([]) do |memo, line|
if line = /^\[\s\]\s+(?<name>\w+)\s+(?<description>.+)$/.match(line)
memo << [line[:name], line[:description]]
else
memo
end
end
end
-
end
end
end