class TypeProf::ConfigData

Constants

DEFAULT_DIR_FILTER

Public Class Methods

new(**opt) click to toggle source
Calls superclass method
# File typeprof-0.15.2/lib/typeprof/config.rb, line 26
def initialize(**opt)
  opt[:output] ||= $stdout
  opt[:gem_rbs_features] ||= []
  opt[:gem_repo_dirs] ||= []
  opt[:dir_filter] ||= DEFAULT_DIR_FILTER
  opt[:verbose] ||= 0
  opt[:options] ||= {}
  opt[:options] = {
    exclude_untyped: false,
    show_typeprof_version: true,
    show_indicator: true,
    show_untyped: false,
    show_errors: false,
    show_parameter_names: true,
    show_source_locations: false,
    stub_execution: true,
    type_depth_limit: 5,
    union_width_limit: 10,
    stackprof: nil,
  }.merge(opt[:options])
  super(**opt)
end

Public Instance Methods

check_dir_filter(path) click to toggle source
# File typeprof-0.15.2/lib/typeprof/config.rb, line 49
def check_dir_filter(path)
  dir_filter.reverse_each do |cond, dir|
    return cond unless dir
    return cond if path.start_with?(dir)
  end
end