Class: Gadafi::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/gadafi/cli.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(argument) ⇒ Object



15
16
17
# File 'lib/gadafi/cli.rb', line 15

def method_missing argument
  shorten argument
end

Instance Method Details

#shorten(url) ⇒ Object



10
11
12
13
# File 'lib/gadafi/cli.rb', line 10

def shorten url
  g = Gadafi.new
  puts g.short_url url
end