Class: Discogs::Util

Inherits:
Base
  • Object
show all
Defined in:
lib/util.rb

Constant Summary

Constants inherited from Base

Base::DISCOGS_BASE_URL

Instance Attribute Summary

Attributes inherited from Base

#api_key, #request_string, #request_type

Class Method Summary collapse

Methods inherited from Base

#fetched, #initialize, #parsed

Constructor Details

This class inherits a constructor from Discogs::Base

Class Method Details

.run!Object



4
5
6
7
8
9
10
# File 'lib/util.rb', line 4

def run!
  if ARGV.size < 1
    usage
  end
  search = Discogs::Search.new(ARGV.join(' '))
  puts search.best_match
end

.usageObject



12
13
14
15
# File 'lib/util.rb', line 12

def usage
  puts "Usage:\n\tdiscogs Broken Social Scene"
  exit
end