Sha256: 9f78b08cdabb9d59959d824c870c2ab41f80f59b147bd2f8085d7e219a63b89f
Contents?: true
Size: 1.27 KB
Versions: 2
Compression:
Stored size: 1.27 KB
Contents
module Capcode class << self # Set global configuration options # # Options : # * <tt>:port</tt> = Listen port (default: 3000) # * <tt>:host</tt> = Listen host (default: 0.0.0.0) # * <tt>:server</tt> = Server type (webrick or mongrel) # * <tt>:log</tt> = Output logfile (default: STDOUT) # * <tt>:session</tt> = Session parameters. See Rack::Session for more informations # * <tt>:pid</tt> = PID file (default: $0.pid) # * <tt>:daemonize</tt> = Daemonize application (default: false) # * <tt>:db_config</tt> = database configuration file (default: database.yml) # * <tt>:static</tt> = Static directory (default: the working directory) # * <tt>:root</tt> = Root directory (default: directory of the main.rb) -- This is also the working directory ! # * <tt>:verbose</tt> = run in verbose mode # * <tt>:auth</tt> = HTTP Basic Authentication options # # It can exist specifics options depending on a renderer, a helper, ... # # Example : # # module Capcode # set :erb, "/path/to/erb/files" # ... # end def set( key, value ) config[key] = value end def get( key ) #:nodoc: config[key] || nil end def config @configuration ||= {} end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
Capcode-0.8.8 | lib/capcode/configuration.rb |
Capcode-0.8.7 | lib/capcode/configuration.rb |