gopt 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +23 -0
 - data/README.en +23 -0
 - data/lib/gopt.rb +33 -0
 - metadata +55 -0
 
    
        data/README
    ADDED
    
    | 
         @@ -0,0 +1,23 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            gopt �⥸�塼��
         
     | 
| 
      
 2 
     | 
    
         
            +
            ==============
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            gopt �ϥ��֥������Ȼظ�������ץȸ��� Ruby ��getoptlong �δ�ñ�ʥ�åѡ�
         
     | 
| 
      
 5 
     | 
    
         
            +
            �Ǥ���
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
            ���ȡ���
         
     | 
| 
      
 9 
     | 
    
         
            +
            ------------
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            ������ץ� "install.rb" ��Ĥ����ޤ���
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
              $ ruby install.rb config
         
     | 
| 
      
 14 
     | 
    
         
            +
              $ ruby install.rb setup
         
     | 
| 
      
 15 
     | 
    
         
            +
             ($ su)
         
     | 
| 
      
 16 
     | 
    
         
            +
              # ruby install.rb install
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
            ���路���ϡ�"ruby install.rb --help" �Ȥ��Ƥ���������
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
            ������� (�դʤФ����褷)
         
     | 
| 
      
 22 
     | 
    
         
            +
            mailto:tadf@funaba.org
         
     | 
| 
      
 23 
     | 
    
         
            +
            http://www.funaba.org/
         
     | 
    
        data/README.en
    ADDED
    
    | 
         @@ -0,0 +1,23 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            gopt module
         
     | 
| 
      
 2 
     | 
    
         
            +
            ==============
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            gopt is a simple wrapper of getoptlong of an object‐oriented
         
     | 
| 
      
 5 
     | 
    
         
            +
            scripting language Ruby.
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
            Install
         
     | 
| 
      
 9 
     | 
    
         
            +
            ‐‐‐‐‐‐‐
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            Use the script "install.rb".
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
              $ ruby install.rb config
         
     | 
| 
      
 14 
     | 
    
         
            +
              $ ruby install.rb setup
         
     | 
| 
      
 15 
     | 
    
         
            +
             ($ su)
         
     | 
| 
      
 16 
     | 
    
         
            +
              # ruby install.rb install
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
            For more information, type "ruby install.rb ‐‐help".
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
            Tadayoshi Funaba
         
     | 
| 
      
 22 
     | 
    
         
            +
            mailto:tadf@funaba.org
         
     | 
| 
      
 23 
     | 
    
         
            +
            http://www.funaba.org/en/
         
     | 
    
        data/lib/gopt.rb
    ADDED
    
    | 
         @@ -0,0 +1,33 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # gopt.rb: Written by Tadayoshi Funaba 2005
         
     | 
| 
      
 2 
     | 
    
         
            +
            # $Id: gopt.rb,v 1.1 2005-07-09 07:44:04+09 tadf Exp $
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            require 'getoptlong'
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            module Gopt
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
              def gopt(opts)
         
     | 
| 
      
 9 
     | 
    
         
            +
                begin
         
     | 
| 
      
 10 
     | 
    
         
            +
                  gol = GetoptLong.
         
     | 
| 
      
 11 
     | 
    
         
            +
            	new(*opts.scan(/[^:]:{0,2}/).collect{|c|
         
     | 
| 
      
 12 
     | 
    
         
            +
            	      ['-' + c[0,1],
         
     | 
| 
      
 13 
     | 
    
         
            +
            		case c.size
         
     | 
| 
      
 14 
     | 
    
         
            +
            		when 1; GetoptLong::NO_ARGUMENT
         
     | 
| 
      
 15 
     | 
    
         
            +
            		when 2; GetoptLong::REQUIRED_ARGUMENT
         
     | 
| 
      
 16 
     | 
    
         
            +
            		when 3; GetoptLong::OPTIONAL_ARGUMENT
         
     | 
| 
      
 17 
     | 
    
         
            +
            		end]})
         
     | 
| 
      
 18 
     | 
    
         
            +
                  gol.quiet = true
         
     | 
| 
      
 19 
     | 
    
         
            +
                  val = {}
         
     | 
| 
      
 20 
     | 
    
         
            +
                  gol.each{|opt, arg| val[opt[1,1].intern] = arg}
         
     | 
| 
      
 21 
     | 
    
         
            +
                  val
         
     | 
| 
      
 22 
     | 
    
         
            +
                rescue
         
     | 
| 
      
 23 
     | 
    
         
            +
                  nil
         
     | 
| 
      
 24 
     | 
    
         
            +
                end
         
     | 
| 
      
 25 
     | 
    
         
            +
              end
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
              module_function :gopt
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
            end
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
            if __FILE__ == $0
         
     | 
| 
      
 32 
     | 
    
         
            +
              p Gopt.gopt('ab:c::')
         
     | 
| 
      
 33 
     | 
    
         
            +
            end
         
     | 
    
        metadata
    ADDED
    
    | 
         @@ -0,0 +1,55 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            --- !ruby/object:Gem::Specification 
         
     | 
| 
      
 2 
     | 
    
         
            +
            name: gopt
         
     | 
| 
      
 3 
     | 
    
         
            +
            version: !ruby/object:Gem::Version 
         
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.1
         
     | 
| 
      
 5 
     | 
    
         
            +
            platform: ruby
         
     | 
| 
      
 6 
     | 
    
         
            +
            authors: 
         
     | 
| 
      
 7 
     | 
    
         
            +
            - Tadayoshi Funaba
         
     | 
| 
      
 8 
     | 
    
         
            +
            autorequire: gopt
         
     | 
| 
      
 9 
     | 
    
         
            +
            bindir: bin
         
     | 
| 
      
 10 
     | 
    
         
            +
            cert_chain: []
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2008-11-12 00:00:00 +09:00
         
     | 
| 
      
 13 
     | 
    
         
            +
            default_executable: 
         
     | 
| 
      
 14 
     | 
    
         
            +
            dependencies: []
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
            description: 
         
     | 
| 
      
 17 
     | 
    
         
            +
            email: tadf@funaba.org
         
     | 
| 
      
 18 
     | 
    
         
            +
            executables: []
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
            extensions: []
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
            extra_rdoc_files: []
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
            files: 
         
     | 
| 
      
 25 
     | 
    
         
            +
            - README
         
     | 
| 
      
 26 
     | 
    
         
            +
            - README.en
         
     | 
| 
      
 27 
     | 
    
         
            +
            - lib/gopt.rb
         
     | 
| 
      
 28 
     | 
    
         
            +
            has_rdoc: false
         
     | 
| 
      
 29 
     | 
    
         
            +
            homepage: http://www.funaba.org/en/ruby.html
         
     | 
| 
      
 30 
     | 
    
         
            +
            post_install_message: 
         
     | 
| 
      
 31 
     | 
    
         
            +
            rdoc_options: []
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
            require_paths: 
         
     | 
| 
      
 34 
     | 
    
         
            +
            - lib
         
     | 
| 
      
 35 
     | 
    
         
            +
            required_ruby_version: !ruby/object:Gem::Requirement 
         
     | 
| 
      
 36 
     | 
    
         
            +
              requirements: 
         
     | 
| 
      
 37 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 38 
     | 
    
         
            +
                - !ruby/object:Gem::Version 
         
     | 
| 
      
 39 
     | 
    
         
            +
                  version: "0"
         
     | 
| 
      
 40 
     | 
    
         
            +
              version: 
         
     | 
| 
      
 41 
     | 
    
         
            +
            required_rubygems_version: !ruby/object:Gem::Requirement 
         
     | 
| 
      
 42 
     | 
    
         
            +
              requirements: 
         
     | 
| 
      
 43 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 44 
     | 
    
         
            +
                - !ruby/object:Gem::Version 
         
     | 
| 
      
 45 
     | 
    
         
            +
                  version: "0"
         
     | 
| 
      
 46 
     | 
    
         
            +
              version: 
         
     | 
| 
      
 47 
     | 
    
         
            +
            requirements: []
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
| 
      
 49 
     | 
    
         
            +
            rubyforge_project: tadf
         
     | 
| 
      
 50 
     | 
    
         
            +
            rubygems_version: 1.3.1
         
     | 
| 
      
 51 
     | 
    
         
            +
            signing_key: 
         
     | 
| 
      
 52 
     | 
    
         
            +
            specification_version: 2
         
     | 
| 
      
 53 
     | 
    
         
            +
            summary: gopt is a simple wrapper of getoptlong of an object-oriented scripting language Ruby.
         
     | 
| 
      
 54 
     | 
    
         
            +
            test_files: []
         
     | 
| 
      
 55 
     | 
    
         
            +
             
     |