Sha256: 223ba365e57739f7d4a1188052364981fec3490eb5b393ad2093cc987f34853c
Contents?: true
Size: 1.17 KB
Versions: 1
Compression:
Stored size: 1.17 KB
Contents
require File.join(File.dirname(__FILE__), "..", "lib", "sickle") module Sub include Sickle::Runner desc "Run task Sub1" def sub1 p ["sub1"] end def conflict p ["sub1:conflict"] end end module Other include Sickle::Runner desc "Run task other sub1" def other1(blah) p ["other1", blah] end def conflict p ["other1:conflict"] end end module NoSub include Sickle::Runner desc "No sub for me" def nosub p ["nosub"] end def conflict p ["nosub:conflict"] end end class App include Sickle::Runner global_option :verbose global_option :debug desc "Run task 1" option :quiet def task1(a, b, c = "def") p ["task1", a, b, c, options[:quiet], options[:verbose], options[:debug]] end desc "Run task 2" option :fast option :slow option :number, :default => 10 def task2 p ["task2", options[:number], options[:fast], options[:slow], options[:verbose], options[:debug]] end def conflict p ["app:conflict"] end option :null, :default => nil def test_option p ["test_option", options[:null]] end include_modules :sub => Sub, :other => Other include NoSub end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sickle-0.1.1 | spec/test_app.rb |