class ChaosDetector::Options
Constants
- IGNORE_MODULES
TODO: Ability to run on self:
- IGNORE_PATHS
Public Instance Methods
domain_from_path(local_path)
click to toggle source
# File lib/chaos_detector/options.rb, line 39 def domain_from_path(local_path) # dpath = Pathname.new(path.to_s).cleanpath.to_s # @domain_hash[dpath] = group # # @domain_hash = {} # @options.path_domain_hash && options.path_domain_hash.each do |path, group| # key = path_domain_hash.keys.find { |k| local_path.start_with?(k.to_s) } key ? path_domain_hash[key] : ChaosDetector::GraphTheory::Node::ROOT_NODE_NAME end
path_with_root(key:nil, path:nil)
click to toggle source
# File lib/chaos_detector/options.rb, line 32 def path_with_root(key:nil, path:nil) raise ArgumentError, "key: OR path: must be set" if key.nil? && path.nil? subpath = key ? send(key.to_sym) : path.to_s File.join(app_root_path, subpath) end