Sha256: 76ac9224546b6b4b4413bf75e0b15eb74af323ec185fd46ab1c6a8fb4e8d3d95
Contents?: true
Size: 1.91 KB
Versions: 3
Compression:
Stored size: 1.91 KB
Contents
module Pakyow module Configuration class App class << self attr_accessor :dev_mode, :log, :public_dir, :root, :log_dir, :presenter, :default_action, :ignore_routes, :error_level, :default_environment, :application_path, :log_name, :src_dir, :auto_reload, :errors_in_browser, :static # Displays development-specific warnings. # def dev_mode @dev_mode.nil? ? true : @dev_mode end def auto_reload @auto_reload.nil? ? true : @auto_reload end def errors_in_browser @errors_in_browser.nil? ? true : @errors_in_browser end # Log requests? def log @log.nil? ? true : @log end # Root directory def root @root || File.dirname('') end # Public directory def public_dir @public_dir || "#{root}/public" end # Log directory def log_dir @log_dir || "#{root}/logs" end def log_name @log_name || "requests.log" end def src_dir @src_dir || "#{root}/app/lib" end # Default action def default_action @default_action || :index end # Mockup mode def ignore_routes @ignore_routes.nil? ? false : @ignore_routes end def default_environment @default_environment || :development end # The path to the application class def application_path @application_path end # Handle static files? # # For best performance, should be set to false if static files are # handled by a web server (e.g. Nginx) # def static @static || true end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
pakyow-core-0.7.2 | pakyow-core/lib/core/configuration/app.rb |
pakyow-core-0.7.1 | pakyow-core/lib/core/configuration/app.rb |
pakyow-core-0.7.0 | pakyow-core/lib/core/configuration/app.rb |