class Based::BaseDirectory
An object representing the base directory
Attributes
dirExclude[R]
Function to decide if sub-directories should be excluded (if a directory is excluded, so are all it's sub-directories and files contained within)
fileExclude[R]
Function to decide if files should be excluded
fileInclude[R]
Function to decide if files should be included (if nil, assume all included). Subject to exclusion by fileExclude
Public Class Methods
new(path, options = {})
click to toggle source
Initialise from absolute file path. Options include :dirExclude, :fileInclude and :fileExclude
Calls superclass method
Based::Directory::new
# File lib/based.rb, line 130 def initialize(path, options = {}) super() @name = nil @parent = nil @base = self @relativePath = "" @pathElements = [] @fullPath = path.end_with?("/") ? path : path + "/" @dirExclude = options.fetch(:dirExclude, nil) @fileInclude = options.fetch(:fileInclude, nil) @fileExclude = options.fetch(:fileExclude, nil) end