Sha256: c6a8fd4efef19af32150a61c956a3b530a35432948051af5cea028ee359dee35

Contents?: true

Size: 1.28 KB

Versions: 1

Compression:

Stored size: 1.28 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, mongrel or thin)
    # * <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

1 entries across 1 versions & 1 rubygems

Version Path
Capcode-0.8.9 lib/capcode/configuration.rb