123456789_123456789_123456789_123456789_123456789_

Class: TypeProf::ConfigData

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Struct
Instance Chain:
self, Struct
Inherits: Struct
  • Object
Defined in: lib/typeprof/config.rb,
lib/typeprof/config.rb

Constant Summary

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(**opt) ⇒ ConfigData

[ GitHub ]

  
# File '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

Instance Attribute Details

#dir_filter (rw)

[ GitHub ]

  
# File 'lib/typeprof/config.rb', line 4

ConfigData = Struct.new(
  :rb_files,
  :rbs_files,
  :output,
  :gem_rbs_features,
  :gem_repo_dirs,
  :verbose,
  :dir_filter,
  :max_iter,
  :max_sec,
  :options,
  keyword_init: true
)

#gem_rbs_features (rw)

[ GitHub ]

  
# File 'lib/typeprof/config.rb', line 4

ConfigData = Struct.new(
  :rb_files,
  :rbs_files,
  :output,
  :gem_rbs_features,
  :gem_repo_dirs,
  :verbose,
  :dir_filter,
  :max_iter,
  :max_sec,
  :options,
  keyword_init: true
)

#gem_repo_dirs (rw)

[ GitHub ]

  
# File 'lib/typeprof/config.rb', line 4

ConfigData = Struct.new(
  :rb_files,
  :rbs_files,
  :output,
  :gem_rbs_features,
  :gem_repo_dirs,
  :verbose,
  :dir_filter,
  :max_iter,
  :max_sec,
  :options,
  keyword_init: true
)

#max_iter (rw)

[ GitHub ]

  
# File 'lib/typeprof/config.rb', line 4

ConfigData = Struct.new(
  :rb_files,
  :rbs_files,
  :output,
  :gem_rbs_features,
  :gem_repo_dirs,
  :verbose,
  :dir_filter,
  :max_iter,
  :max_sec,
  :options,
  keyword_init: true
)

#max_sec (rw)

[ GitHub ]

  
# File 'lib/typeprof/config.rb', line 4

ConfigData = Struct.new(
  :rb_files,
  :rbs_files,
  :output,
  :gem_rbs_features,
  :gem_repo_dirs,
  :verbose,
  :dir_filter,
  :max_iter,
  :max_sec,
  :options,
  keyword_init: true
)

#options (rw)

[ GitHub ]

  
# File 'lib/typeprof/config.rb', line 4

ConfigData = Struct.new(
  :rb_files,
  :rbs_files,
  :output,
  :gem_rbs_features,
  :gem_repo_dirs,
  :verbose,
  :dir_filter,
  :max_iter,
  :max_sec,
  :options,
  keyword_init: true
)

#output (rw)

[ GitHub ]

  
# File 'lib/typeprof/config.rb', line 4

ConfigData = Struct.new(
  :rb_files,
  :rbs_files,
  :output,
  :gem_rbs_features,
  :gem_repo_dirs,
  :verbose,
  :dir_filter,
  :max_iter,
  :max_sec,
  :options,
  keyword_init: true
)

#rb_files (rw)

[ GitHub ]

  
# File 'lib/typeprof/config.rb', line 4

ConfigData = Struct.new(
  :rb_files,
  :rbs_files,
  :output,
  :gem_rbs_features,
  :gem_repo_dirs,
  :verbose,
  :dir_filter,
  :max_iter,
  :max_sec,
  :options,
  keyword_init: true
)

#rbs_files (rw)

[ GitHub ]

  
# File 'lib/typeprof/config.rb', line 4

ConfigData = Struct.new(
  :rb_files,
  :rbs_files,
  :output,
  :gem_rbs_features,
  :gem_repo_dirs,
  :verbose,
  :dir_filter,
  :max_iter,
  :max_sec,
  :options,
  keyword_init: true
)

#verbose (rw)

[ GitHub ]

  
# File 'lib/typeprof/config.rb', line 4

ConfigData = Struct.new(
  :rb_files,
  :rbs_files,
  :output,
  :gem_rbs_features,
  :gem_repo_dirs,
  :verbose,
  :dir_filter,
  :max_iter,
  :max_sec,
  :options,
  keyword_init: true
)

Instance Method Details

#check_dir_filter(path)

[ GitHub ]

  
# File '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