module Heel::Configuration - heel-3.1.0 Documentation

# module Heel::Configuration

Configuration module used by all the other modules and classes fordetermining paths and default values.

### Constants

HOMEPAGE

### Public Class Methods

config_path(*args) click to toggle source

returns:: [String] The full expanded path of the `config` directorybelow root_dir. All parameters passed in are joined onto theresult. Trailing File::SEPARATOR is guaranteed if args are*not* present.

    # File lib/heel/configuration.rb, line 32
    def self.config_path(*args)
      self.sub_path("config", *args)
    end

data_path(*args) click to toggle source

returns:: [String] The full expanded path of the `data` directory below_root_dir_. All parameters passed in are joined onto the result. Trailing File::SEPARATOR is guaranteed if _*args_ are not present.

    # File lib/heel/configuration.rb, line 41
    def self.data_path(*args)
      self.sub_path("data", *args)
    end

lib_path(*args) click to toggle source

returns:: [String] The full expanded path of the `lib` directory below_root_dir_. All parameters passed in are joined onto the result. Trailing File::SEPARATOR is guaranteed if _*args_ are not present.

    # File lib/heel/configuration.rb, line 50
    def self.lib_path(*args)
      self.sub_path("lib", *args)
    end

root_dir() click to toggle source

The root directory of the project is considered to be the parent directoryof the ‘lib’ directory.

returns:: [String] The full expanded path of the parent directory of ‘lib’going up the path from the current file. TrailingFile::SEPARATOR is guaranteed.

    # File lib/heel/configuration.rb, line 20
    def self.root_dir
      path_parts = ::File.expand_path(__FILE__).split(::File::SEPARATOR)
      lib_index  = path_parts.rindex("lib")
      root_dir   = path_parts[0...lib_index].join(::File::SEPARATOR) + ::File::SEPARATOR
      return root_dir
    end