root/lang/ruby/chokan/branches/citrus/chokan.rb @ 5894

Revision 5894, 462 bytes (checked in by cho45, 5 years ago)

lang/ruby/chokan/branches/citrus:

System プラグインを追加
(Core プラグインだったもの)


  • Property svn:executable set to *
Line 
1#!/usr/bin/env ruby
2$LOAD_PATH << "lib"
3
4require "citrus"
5
6require "optparse"
7require "ostruct"
8require "yaml"
9
10opts = OpenStruct.new({
11        :file => "config.yaml"
12})
13
14OptionParser.new do |parser|
15        parser.instance_eval do
16                self.banner  = <<-EOB.gsub(/^\t+/, "")
17                        Usage: #{$0} [opts]
18
19                EOB
20
21                separator ""
22
23                separator "Options:"
24                on("-c", "--config FILE.yaml", "Config file") do |file|
25                        opts.file = file
26                end
27
28                parse!(ARGV)
29        end
30end
31
32Citrus.run(opts.file)
33
Note: See TracBrowser for help on using the browser.