File: app2.rb

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

class App < CommandLine::Application

  def initialize
    synopsis "help me out here!"
    expected_args :file, :fred
  end

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

end#class App