Parse the command line arguments for this application.

Methods
Attributes
[RW] application The application this parser configures.
Public Instance methods
__adapter(adapter)

Override the adapter.

    # File lib/nitro/application/args.rb, line 32
32:   def __adapter(adapter)
33:     @application.adapter = adapter.to_sym
34:   end
__app(name)

The name of this application.

    # File lib/nitro/application/args.rb, line 20
20:   def __app(name)
21:   end
__daemon()

Run the application as a daemon.

    # File lib/nitro/application/args.rb, line 77
77:   def __daemon
78:     require "facets/core/kernel/daemonize"
79: 
80:     pwd = Dir.pwd
81:     daemonize()
82:     # Restore the original pwd (daemonize cd's to '/').
83:     Dir.chdir(pwd)
84: 
85:     # Save a process sentinel file.
86:     FileUtils.touch(File.join(".temp","a#{Process.pid}.pid"))
87:     
88:     # Set the logger to a file (daemonize closes the std streams).
89:     Logger.set(Logger.new("log/app.log"))
90:   end
__debug()

Run in debug mode. Useful for development.

This method is also aliased as __devel
    # File lib/nitro/application/args.rb, line 56
56:   def __debug
57:     Nitro.mode = :debug
58:   end
__devel()

Alias for #__debug

__live()

Run in live mode. Used in the production environment.

This method is also aliased as __production
    # File lib/nitro/application/args.rb, line 70
70:   def __live
71:     Nitro.mode = :live
72:   end
__mode(mode)

Override the execution mode.

    # File lib/nitro/application/args.rb, line 50
50:   def __mode(mode)
51:     Nitro.mode = mode.to_sym
52:   end
__mongrel()

Run with Mongrel adapter.

    # File lib/nitro/application/args.rb, line 44
44:   def __mongrel
45:     @application.adapter = :mongrel
46:   end
__port_offset(offset)

Add this offest to the listening port. Useful in cluster configurations.

    # File lib/nitro/application/args.rb, line 26
26:   def __port_offset(offset)
27:     @application.port += offset.to_i
28:   end
__production()

Alias for #__live

__stage()

Run in stage mode. Useful for final testing before going live.

    # File lib/nitro/application/args.rb, line 64
64:   def __stage
65:     Nitro.mode = :stage
66:   end
__webrick()

Run with Webrick adapter.

    # File lib/nitro/application/args.rb, line 38
38:   def __webrick
39:     @application.adapter = :mongrel
40:   end
default()

The default action.

    # File lib/nitro/application/args.rb, line 15
15:   def default
16:   end