File: app_replay.rb

package info (click to toggle)
libcommandline-ruby 0.7.10-6
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 556 kB
  • ctags: 289
  • sloc: ruby: 2,881; makefile: 5
file content (19 lines) | stat: -rw-r--r-- 408 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env ruby
  require 'commandline'
  require 'rubygems'

  class App < CommandLine::Application
    def initialize
      use_replay
      option :help, :debug
      expected_args :input, :output
    end

    def main
      p @arg_names
      puts "#{name} called with #{@args.size} arguments: #{@args.inspect}"
      puts "input:  #{@input}"
      puts "output: #{@output}"
    end

  end#class App