Parent

Methods

Slim::Command

Slim commandline interface @api private

Public Class Methods

new(args) click to toggle source
# File lib/slim/command.rb, line 10
def initialize(args)
  @args = args
  @options = {}
end

Public Instance Methods

run() click to toggle source

Run command

# File lib/slim/command.rb, line 16
def run
  @opts = OptionParser.new(&method(:set_opts))
  @opts.parse!(@args)
  process
  exit 0
rescue Exception => ex
  raise ex if @options[:trace] || SystemExit === ex
  $stderr.print "#{ex.class}: " if ex.class != RuntimeError
  $stderr.puts ex.message
  $stderr.puts '  Use --trace for backtrace.'
  exit 1
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.