module DataImp::Dir

Public Class Methods

extended(mod) click to toggle source
# File lib/data_imp/dir.rb, line 3
def self.extended(mod)
  mod.delegate :data_dir, to: :class
end

Public Instance Methods

data_dir() click to toggle source
# File lib/data_imp/dir.rb, line 25
def data_dir
  @data_dir ||= root.join('data')
end
data_dir=(dir) click to toggle source
# File lib/data_imp/dir.rb, line 15
def data_dir= dir
  path = Pathname.new(dir)
  @data_dir = 
    if path.absolute?
      path
    else
      root.join(path)
    end
end
root() click to toggle source
# File lib/data_imp/dir.rb, line 11
def root
  @root ||= Pathname.pwd
end
root=(dir) click to toggle source
# File lib/data_imp/dir.rb, line 7
def root= dir
  @root = dir
end