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 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

Instance Attribute Details

#collection_path (rw)

[ GitHub ]

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

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

#dir_filter (rw)

[ GitHub ]

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

ConfigData = Struct.new(
  :rb_files,
  :rbs_files,
  :output,
  :gem_rbs_features,
  :collection_path,
  :verbose,
  :dir_filter,
  :max_iter,
  :max_sec,
  :options,
  :lsp_options,
  :lsp,
  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,
  :collection_path,
  :verbose,
  :dir_filter,
  :max_iter,
  :max_sec,
  :options,
  :lsp_options,
  :lsp,
  keyword_init: true
)

#lsp (rw)

[ GitHub ]

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

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

#lsp_options (rw)

[ GitHub ]

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

ConfigData = Struct.new(
  :rb_files,
  :rbs_files,
  :output,
  :gem_rbs_features,
  :collection_path,
  :verbose,
  :dir_filter,
  :max_iter,
  :max_sec,
  :options,
  :lsp_options,
  :lsp,
  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,
  :collection_path,
  :verbose,
  :dir_filter,
  :max_iter,
  :max_sec,
  :options,
  :lsp_options,
  :lsp,
  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,
  :collection_path,
  :verbose,
  :dir_filter,
  :max_iter,
  :max_sec,
  :options,
  :lsp_options,
  :lsp,
  keyword_init: true
)

#options (rw)

[ GitHub ]

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

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

#output (rw)

[ GitHub ]

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

ConfigData = Struct.new(
  :rb_files,
  :rbs_files,
  :output,
  :gem_rbs_features,
  :collection_path,
  :verbose,
  :dir_filter,
  :max_iter,
  :max_sec,
  :options,
  :lsp_options,
  :lsp,
  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,
  :collection_path,
  :verbose,
  :dir_filter,
  :max_iter,
  :max_sec,
  :options,
  :lsp_options,
  :lsp,
  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,
  :collection_path,
  :verbose,
  :dir_filter,
  :max_iter,
  :max_sec,
  :options,
  :lsp_options,
  :lsp,
  keyword_init: true
)

#verbose (rw)

[ GitHub ]

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

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

Instance Method Details

#check_dir_filter(path)

[ GitHub ]

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