class Pith::Config

Constants

DEFAULT_IGNORE_PATTERNS

Attributes

assume_content_negotiation[RW]
assume_directory_index[RW]
helper_module[R]
ignore_patterns[R]

Public Class Methods

load(config_file) click to toggle source
# File lib/pith/config.rb, line 31
def load(config_file)
  config = self.new
  if config_file.exist?
    project = config # for backward compatibility
    eval(config_file.read, binding, config_file.to_s, 1)
  end
  config
end
new() click to toggle source
# File lib/pith/config.rb, line 9
def initialize
  @ignore_patterns = DEFAULT_IGNORE_PATTERNS.dup
  @helper_module = Module.new
end

Public Instance Methods

helpers(&block) click to toggle source
# File lib/pith/config.rb, line 25
def helpers(&block)
  helper_module.module_eval(&block)
end
ignore(*pattern) click to toggle source
# File lib/pith/config.rb, line 19
def ignore(*pattern)
  pattern.flatten.each {|p| ignore_patterns << p }
end