Sha256: c3bda8939ea8fe8811c6486ee8e24a1da22a6f024e45c92c4d8eca915fe374ee

Contents?: true

Size: 699 Bytes

Versions: 1

Compression:

Stored size: 699 Bytes

Contents

require 'getme/version'
require 'getme/exceptions'
require 'getme/utilities'
require 'getme/vendors'

module Getme

  extend self

  def the(what=nil)
    return "What do you want me to download for you?" if what.nil?
    what = what.to_sym
    type ||= if Getme::Vendors[:files].has_key? what
             :files
           elsif Getme::Vendors[:zips].has_key? what
             :zips
           else
             :not_available
           end
    return "Did not find a candidate of #{what}, typo?" if type == :not_available
    unless Getme::Vendors[type][what].nil?
      util = Utilities.new
      util.cmd(util.downloader, Getme::Vendors[type][what])
      return 'success!'
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
getme-0.0.2 lib/getme.rb