File: trace.rb

package info (click to toggle)
ruby-mercenary 0.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 192 kB
  • sloc: ruby: 570; sh: 25; makefile: 6
file content (20 lines) | stat: -rwxr-xr-x 489 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift File.join(__dir__, "..", "lib")

require "mercenary"

# This example sets the logging mode of mercenary to
# debug. Logging messages from "p.logger.debug" will
# be output to STDOUT.

Mercenary.program(:trace) do |p|
  p.version "2.0.1"
  p.description "An example of traces in Mercenary"
  p.syntax "trace <subcommand>"

  p.action do |_, _|
    raise ArgumentError, "YOU DID SOMETHING TERRIBLE YOU BUFFOON"
  end
end