Class: Raval::App
- Inherits:
-
Object
- Object
- Raval::App
- Defined in:
- lib/raval/app.rb
Overview
Holds the logic for booting a raval server and configuring the process as required, binding to a port, writing a pid file, etc.
Use it like so:
Raval::App.start(:port => 3000)
Options:
:driver - the driver class that implements persistance
:driver_opts - an optional Hash of options to be passed to the driver
constructor
:host - the host IP to listen on. [default: 127.0.0.1]
:port - the TCP port to listen on [default: 21]
:pid_file - a path to write the process pid to. Useful for monitoring
:user - the user ID to change the process owner to
:group - the group ID to change the process owner to
:name - an optional name to place in the process description
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ App
constructor
A new instance of App.
- #start ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ App
Returns a new instance of App.
25 26 27 |
# File 'lib/raval/app.rb', line 25 def initialize( = {}) @options = end |
Class Method Details
.start(options = {}) ⇒ Object
29 30 31 |
# File 'lib/raval/app.rb', line 29 def self.start( = {}) self.new().start end |