Module: Rpub::Commander

Extended by:
Commander
Included in:
Commander
Defined in:
lib/rpub/commander.rb

Instance Method Summary collapse

Instance Method Details

#invoke(args = []) ⇒ Object



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

def invoke(args = [])
  subcommand, *options = args
  Commands::Base.matching(subcommand).new(options).invoke
rescue SubclassTracker::NoSuchSubclass
  Commands::Main.new(args).invoke
rescue NoConfiguration
  abort 'The current directory does not look like an rpub project.'
end