class TypeProf::ConfigData

Constants

DEFAULT_DIR_FILTER

Public Class Methods

new(**opt) click to toggle source
Calls superclass method
# File typeprof-0.21.2/lib/typeprof/config.rb, line 28
def initialize(**opt)
  opt[:output] ||= $stdout
  opt[:gem_rbs_features] ||= []
  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])
  opt[:lsp_options] = {
    port: 0,
    stdio: false,
  }.merge(opt[:lsp_options] || {})
  super(**opt)
end

Public Instance Methods

check_dir_filter(path) click to toggle source
# File typeprof-0.21.2/lib/typeprof/config.rb, line 54
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