Class | Picnic::Cli |
In: |
lib/picnic/cli.rb
|
Parent: | Object |
Provides a command-line interface for your app. This is useful for creating a ‘bin’ file for launching your application.
Usage example (put this in a file called ‘foo’):
#!/usr/bin/env ruby require 'rubygems' require 'picnic' require 'picnic/cli' cli = Picnic::Cli.new( 'foo', :app_path => File.expand_path(File.dirname(File.expand_path(__FILE__))) ) cli.handle_cli_input
Also see the ServiceControl class for info on how to use your cli script as a service.
app | [RW] | |
options | [RW] |
Creates a new command-line interface handler.
app: | The name of the application. This should match the name of the binary, which by default is expected to be in the same directory as the service control script. | ||||||
options: | A hash overriding default options. The options are:
|