Skip to content

Instantly share code, notes, and snippets.

@wycats
Forked from plukevdh/thor_test
Created June 22, 2012 16:05
Show Gist options
  • Save wycats/2973709 to your computer and use it in GitHub Desktop.
Save wycats/2973709 to your computer and use it in GitHub Desktop.
Simple test thor file
#!/usr/bin/env ruby
require 'thor'
class ThorTest < Thor
desc "beta", "test message"
def beta
puts "This is a beta"
end
subcommand "namespacer", Namespacer
class Namespacer < Thor
desc "names", "Prints names"
def names
puts %w{Luke Katie Jimmy James}.join(', ')
end
end
end
ThorTest.start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment