Class: TypeProf::ConfigData
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Struct
|
|
Instance Chain:
self,
Struct
|
|
Inherits: |
Struct
|
Defined in: | lib/typeprof/config.rb, lib/typeprof/config.rb |
Constant Summary
-
DEFAULT_DIR_FILTER =
# File 'lib/typeprof/config.rb', line 56[ [:include], [:exclude, RbConfig::CONFIG["prefix"]], [:exclude, Gem.dir], [:exclude, Gem.user_dir], ]
Class Method Summary
- .new(**opt) ⇒ ConfigData constructor
Instance Attribute Summary
- #dir_filter rw
- #gem_rbs_features rw
- #gem_repo_dirs rw
- #max_iter rw
- #max_sec rw
- #options rw
- #output rw
- #rb_files rw
- #rbs_files rw
- #verbose rw
Instance Method Summary
Constructor Details
.new(**opt) ⇒ ConfigData
# 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[: ] ||= {} opt[: ] = { 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[: ]) 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, :, 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, :, 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, :, 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, :, 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, :, 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, :, 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, :, 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, :, 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, :, 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, :, 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