module Calibrate::Configurable::DirectoryStructure

XXX Consider making the actual dir/path settings r/o Very easy to say

filename = "string"

rather than

filename.relative_path = "string"

and it isn't clear which (abs/rel) you mean

Public Class Methods

included(sub) click to toggle source
# File lib/calibrate/configurable/directory-structure.rb, line 144
def self.included(sub)
  sub.extend ClassMethods
  dir_path =
    if not (file_path = ::Rake.application.rakefile).nil?
      File::dirname(File::expand_path(file_path))
    elsif not (dir_path = ::Rake.application.original_dir).nil?
      dir_path
    else
      file_path = caller[0].split(':')[0]
      File::dirname(File::expand_path(file_path))
    end
  sub.setting :absolute_path, dir_path
end

Public Instance Methods

resolve_paths() click to toggle source
# File lib/calibrate/configurable/directory-structure.rb, line 158
def resolve_paths
  self.class.resolve_paths_on(self)
end