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

Revision 6426, 500 bytes (checked in by cho45, 5 years ago)

lang/ruby/chokan/branches/citrus:

AlwaysNoOp? を追加。gettext を導入


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