Sha256: 7e653a05b9bdcb9d02122f258f010d9c967b79dd424b9da032e5ab9f47590d55

Contents?: true

Size: 357 Bytes

Versions: 3

Compression:

Stored size: 357 Bytes

Contents

module Hanzo
  module Heroku
    class << self

      def available_labs
        `heroku labs`.each_line.to_a.inject([]) 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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hanzo-0.2.2 lib/hanzo/heroku.rb
hanzo-0.2.1 lib/hanzo/heroku.rb
hanzo-0.2 lib/hanzo/heroku.rb