Sha256: 651abb9cf27d7a53aaa974c26effe02d7eebb9258cad1dfc7aa6e366b8298bde
Contents?: true
Size: 434 Bytes
Versions: 76
Compression:
Stored size: 434 Bytes
Contents
#! /usr/bin/env ruby # An example of subcommands 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
76 entries across 72 versions & 18 rubygems