Sha256: 091ad24801d0e68190f0d106ff8359c4b950113808310def5a03e212a57a060d
Contents?: true
Size: 471 Bytes
Versions: 7
Compression:
Stored size: 471 Bytes
Contents
#! /usr/bin/env ruby # An example of subcommands require "clamp" require "clamp/version" class FlipFlop < Clamp::Command 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 FlipFlop.run
Version data entries
7 entries across 7 versions & 2 rubygems