Top Level Namespace

Defined Under Namespace

Modules: Clip

Instance Method Summary collapse

Instance Method Details

#Clip(args = ARGV) {|parser| ... } ⇒ Object

Parse arguments (defaults to ARGV) with the Clip::Parser configured in the given block. This is the main method you call to get the ball rolling.

Yields:

  • (parser)


7
8
9
10
11
12
13
# File 'lib/clip.rb', line 7

def Clip(args=ARGV)
  parser = Clip::Parser.new
  raise "Dontcha wanna configure your parser?" unless block_given?
  yield parser
  parser.parse(args)
  parser
end