Sha256: b13c94bbe0eeff1eab838fae44be58d325ebc0967276a127e3311e5e7cbf0bab
Contents?: true
Size: 467 Bytes
Versions: 4
Compression:
Stored size: 467 Bytes
Contents
#! /usr/bin/env ruby # An example of subcommands (including a default subcommand) require "clamp" require "clamp/version" Clamp do option ["--version", "-v"], :flag, "Show version" do puts "Powered by Clamp-#{Clamp::VERSION}" exit(0) end self.default_subcommand = "flip" subcommand "flip", "flip it" do def execute puts "FLIPPED" end end subcommand "flop", "flop it" do def execute puts "FLOPPED" end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
clamp-1.2.1 | examples/flipflop |
clamp-1.2.0 | examples/flipflop |
clamp-1.2.0.beta1 | examples/flipflop |
clamp-1.1.2 | examples/flipflop |