Class: RBS::Dynamic::Config
- Inherits:
-
Object
- Object
- RBS::Dynamic::Config
- Defined in:
- lib/rbs/dynamic/config.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #except_build_members ⇒ Object
- #ignore_class_members ⇒ Object
- #ignore_classname_pattern ⇒ Object
- #ignore_filepath_pattern ⇒ Object
-
#initialize(options) ⇒ Config
constructor
A new instance of Config.
- #method_defined_calssses ⇒ Object
- #root_path ⇒ Object
- #show_method_location? ⇒ Boolean
- #stdout? ⇒ Boolean
- #target_classname_pattern ⇒ Object
- #target_filepath_pattern ⇒ Object
- #trace_c_api_method? ⇒ Boolean
- #use_interface_method_argument? ⇒ Boolean
- #use_literal_type? ⇒ Boolean
- #with_literal_type? ⇒ Boolean
Constructor Details
#initialize(options) ⇒ Config
Returns a new instance of Config.
7 8 9 |
# File 'lib/rbs/dynamic/config.rb', line 7 def initialize() @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/rbs/dynamic/config.rb', line 5 def @options end |
Instance Method Details
#except_build_members ⇒ Object
11 12 13 |
# File 'lib/rbs/dynamic/config.rb', line 11 def except_build_members ignore_class_members end |
#ignore_class_members ⇒ Object
35 36 37 |
# File 'lib/rbs/dynamic/config.rb', line 35 def ignore_class_members (["ignore-class_members"] || [:ignore_class_members] || []).map(&:to_sym) end |
#ignore_classname_pattern ⇒ Object
31 32 33 |
# File 'lib/rbs/dynamic/config.rb', line 31 def ignore_classname_pattern (["ignore-classname-pattern"] || [:ignore_classname_pattern])&.then { Regexp.new(_1) } end |
#ignore_filepath_pattern ⇒ Object
23 24 25 |
# File 'lib/rbs/dynamic/config.rb', line 23 def ignore_filepath_pattern ["ignore-filepath-pattern"] || [:ignore_filepath_pattern] end |
#method_defined_calssses ⇒ Object
39 40 41 |
# File 'lib/rbs/dynamic/config.rb', line 39 def method_defined_calssses (["method-defined-calsses"] || [:method_defined_calssses] || %i(defined_class receiver_class)).map(&:to_sym) end |
#root_path ⇒ Object
15 16 17 |
# File 'lib/rbs/dynamic/config.rb', line 15 def root_path ["root-path"] || [:root_path] || Dir.pwd end |
#show_method_location? ⇒ Boolean
43 44 45 |
# File 'lib/rbs/dynamic/config.rb', line 43 def show_method_location? ["show-method-location"] || [:show_method_location] || false end |
#stdout? ⇒ Boolean
63 64 65 |
# File 'lib/rbs/dynamic/config.rb', line 63 def stdout? (["stdout"] || [:stdout]).then { _1.nil? ? true : _1 } end |
#target_classname_pattern ⇒ Object
27 28 29 |
# File 'lib/rbs/dynamic/config.rb', line 27 def target_classname_pattern Regexp.new(["target-classname-pattern"] || [:target_classname_pattern] || /.*/) end |
#target_filepath_pattern ⇒ Object
19 20 21 |
# File 'lib/rbs/dynamic/config.rb', line 19 def target_filepath_pattern ["target-filepath-pattern"] || [:target_filepath_pattern] || /.*/ end |
#trace_c_api_method? ⇒ Boolean
59 60 61 |
# File 'lib/rbs/dynamic/config.rb', line 59 def trace_c_api_method? ["trace-c_api-method"] || [:trace_c_api_method] || false end |
#use_interface_method_argument? ⇒ Boolean
55 56 57 |
# File 'lib/rbs/dynamic/config.rb', line 55 def use_interface_method_argument? ["use-interface_method_argument"] || [:use_interface_method_argument] || false end |
#use_literal_type? ⇒ Boolean
47 48 49 |
# File 'lib/rbs/dynamic/config.rb', line 47 def use_literal_type? ["use-literal_type"] || [:use_literal_type] || false end |
#with_literal_type? ⇒ Boolean
51 52 53 |
# File 'lib/rbs/dynamic/config.rb', line 51 def with_literal_type? ["with-literal_type"] || [:with_literal_type] || false end |