Class: Yawast::Commands::Utils

Inherits:
Object
  • Object
show all
Defined in:
lib/commands/utils.rb

Class Method Summary collapse

Class Method Details

.extract_uri(args) ⇒ Object

Raises:

  • (ArgumentError)


6
7
8
9
10
11
12
13
# File 'lib/commands/utils.rb', line 6

def self.extract_uri(args)
  raise ArgumentError, 'You must specify a URL.' if args.empty?

  # this might be a bad assumption
  url = args[0]

  Yawast::Shared::Uri.extract_uri url
end