class Rly::CLI

Handle the application command line parsing and the dispatch to various command objects

@api public

Constants

Error

Error raised by this runner

Public Instance Methods

add(name, url) click to toggle source
# File lib/rly/cli.rb, line 52
def add(name, url)
  if options[:help]
    invoke :help, ['add']
  else
    require_relative 'commands/add'
    Rly::Commands::Add.new(name, url, options).execute
  end
end
list(*) click to toggle source
# File lib/rly/cli.rb, line 38
def list(*)
  if options[:help]
    invoke :help, ['list']
  else
    require_relative 'commands/list'
    Rly::Commands::List.new(options).execute
  end
end
o(name)
Alias for: open
open(name) click to toggle source
# File lib/rly/cli.rb, line 24
def open(name)
  if options[:help]
    invoke :help, ['open']
  else
    require_relative 'commands/open'
    Rly::Commands::Open.new(name, options).execute
  end
end
Also aliased as: o
remove(name) click to toggle source
# File lib/rly/cli.rb, line 64
def remove(name)
  if options[:help]
    invoke :help, ['remove']
  else
    require_relative 'commands/remove'
    Rly::Commands::Remove.new(name, options).execute
  end
end
version() click to toggle source
# File lib/rly/cli.rb, line 15
def version
  require_relative 'version'
  puts "v#{Rly::VERSION}"
end