Sha256: 5802e1f429e8e4d42891e75183c6dcb03c49fc3407cc2bf443726d95c5805bc5
Contents?: true
Size: 716 Bytes
Versions: 14
Compression:
Stored size: 716 Bytes
Contents
#!/usr/bin/env ruby rd = File.expand_path("../../../lib") $:.unshift rd unless $:.include? rd task :hello do |t| sys.touch t.name end conf = plugin :Configure do |conf| conf.init_modes = [:default] conf.override_modes = nil conf.task # define a task named :configure conf.check "a" do |c| c.default "value_a" c.guess { "value_a_guess" } c.react { |val| p val } end conf.check "b" do |c| c.default "value_b" end conf.check "c" do |c| end conf.check "d" do |c| c.react { } end conf.check "e" do |c| c.guess { false } end end file conf["a"] do |t| sys.touch t.name end task :clean do sys.rm_f %w(config hello value_a value_a_guess) end
Version data entries
14 entries across 14 versions & 1 rubygems