lib/picky.rb in picky-4.7.0 vs lib/picky.rb in picky-4.8.0
- old
+ new
@@ -1,7 +1,15 @@
module Picky
+ # Picky class methods.
+ # * logger: Picky specific logger.
+ # * root: Root used for Picky (eg. index directories).
+ #
+ class << self
+ attr_accessor :logger, :root
+ end
+
# Set default encoding.
# (Note: Rails does this already as well)
#
# THINK Set default encoding?
#
@@ -36,10 +44,15 @@
MultiJson.use :yajl if defined? ::Yajl
# Require the constants.
#
require_relative 'picky/constants'
+
+ # Set the root path of Picky.
+ # (necessary for the index directory etc.)
+ #
+ Picky.root = Dir.pwd
# Loader which handles framework and app loading.
#
require_relative 'picky/loader'
@@ -48,15 +61,16 @@
Loader.load_framework
# Check if delegators need to be installed.
#
require_relative 'picky/sinatra'
-
- # This is only used in the classic project style.
- #
- class << self
- attr_accessor :logger
- end
+ # Set the default logger.
+ #
+ # Options include:
+ # * Loggers::Silent
+ # * Loggers::Concise (default)
+ # * Loggers::Verbose
+ #
self.logger = Loggers::Default
end
\ No newline at end of file