class Confinement::Config

Attributes

logger[W]
root[R]

Public Class Methods

new(root:) click to toggle source
# File lib/confinement.rb, line 124
def initialize(root:)
  @root = Pathname.new(root).expand_path.cleanpath

  if !@root.exist?
    raise Error::PathDoesNotExist, "Root path does not exist: #{@root}"
  end
end

Public Instance Methods

default_logger() click to toggle source
# File lib/confinement.rb, line 139
def default_logger
  Logger.new($stdout).tap do |l|
    l.level = Logger::INFO
  end
end
logger() click to toggle source
# File lib/confinement.rb, line 135
def logger
  @logger ||= default_logger
end