orthoses 1.7.0 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -3
- data/lib/orthoses/attribute.rb +28 -55
- data/lib/orthoses/builder.rb +7 -3
- data/lib/orthoses/constant.rb +0 -1
- data/lib/orthoses/content/duplication_checker.rb +67 -35
- data/lib/orthoses/content/environment.rb +1 -1
- data/lib/orthoses/content.rb +20 -13
- data/lib/orthoses/create_file_by_name.rb +38 -7
- data/lib/orthoses/lazy_trace_point.rb +37 -43
- data/lib/orthoses/missing_name.rb +81 -0
- data/lib/orthoses/mixin.rb +29 -34
- data/lib/orthoses/rbs_prototype_runtime.rb +23 -4
- data/lib/orthoses/trace/attribute.rb +26 -8
- data/lib/orthoses/utils.rb +2 -2
- data/lib/orthoses/version.rb +1 -1
- data/lib/orthoses.rb +1 -0
- data/sig/orthoses/_call.rbs +1 -1
- data/sig/orthoses/_middle_ware.rbs +1 -1
- data/sig/orthoses/attribute/hook.rbs +1 -1
- data/sig/orthoses/attribute.rbs +3 -3
- data/sig/orthoses/autoload/hook.rbs +1 -1
- data/sig/orthoses/autoload.rbs +2 -1
- data/sig/orthoses/builder/call_logable.rbs +1 -1
- data/sig/orthoses/builder.rbs +7 -4
- data/sig/orthoses/call_tracer/capturable.rbs +1 -1
- data/sig/orthoses/call_tracer/capture.rbs +2 -2
- data/sig/orthoses/call_tracer/lazy.rbs +4 -2
- data/sig/orthoses/call_tracer.rbs +3 -1
- data/sig/orthoses/const_load_error.rbs +4 -1
- data/sig/orthoses/constant.rbs +3 -3
- data/sig/orthoses/content/array_io.rbs +2 -1
- data/sig/orthoses/content/duplication_checker.rbs +10 -3
- data/sig/orthoses/content/environment.rbs +11 -6
- data/sig/orthoses/content/header_builder.rbs +3 -1
- data/sig/orthoses/content.rbs +7 -1
- data/sig/orthoses/create_file_by_name.rbs +8 -3
- data/sig/orthoses/delegate_class/hook.rbs +1 -1
- data/sig/orthoses/delegate_class.rbs +2 -2
- data/sig/orthoses/filter.rbs +4 -3
- data/sig/orthoses/lazy_trace_point/method_added_hook.rbs +6 -0
- data/sig/orthoses/lazy_trace_point/signleton_method_added_hook.rbs +5 -0
- data/sig/orthoses/lazy_trace_point.rbs +7 -7
- data/sig/orthoses/load_rbs.rbs +3 -3
- data/sig/orthoses/missing_name/missing_class.rbs +8 -0
- data/sig/orthoses/missing_name/missing_module.rbs +8 -0
- data/sig/orthoses/missing_name.rbs +7 -0
- data/sig/orthoses/mixin/hook.rbs +2 -2
- data/sig/orthoses/mixin.rbs +6 -4
- data/sig/orthoses/name_space_error.rbs +1 -1
- data/sig/orthoses/object_space_all.rbs +2 -2
- data/sig/orthoses/outputable/avoid_recursive_ancestor_error.rbs +2 -2
- data/sig/orthoses/outputable/constantizable_filter.rbs +2 -1
- data/sig/orthoses/outputable/uniq_content_body.rbs +2 -1
- data/sig/orthoses/outputable.rbs +3 -1
- data/sig/orthoses/path_helper.rbs +3 -1
- data/sig/orthoses/pp.rbs +2 -1
- data/sig/orthoses/rbs_prototype_rb.rbs +6 -4
- data/sig/orthoses/rbs_prototype_runtime.rbs +10 -3
- data/sig/orthoses/sort.rbs +2 -1
- data/sig/orthoses/store.rbs +2 -1
- data/sig/orthoses/tap.rbs +3 -2
- data/sig/orthoses/trace/attribute/hook.rbs +11 -0
- data/sig/orthoses/trace/attribute.rbs +4 -1
- data/sig/orthoses/trace/method/info.rbs +1 -1
- data/sig/orthoses/trace/method.rbs +6 -1
- data/sig/orthoses/trace/targetable.rbs +1 -1
- data/sig/orthoses/trace.rbs +3 -1
- data/sig/orthoses/utils/type_list.rbs +2 -1
- data/sig/orthoses/utils/underscore.rbs +1 -1
- data/sig/orthoses/utils.rbs +4 -2
- data/sig/orthoses/walk.rbs +3 -3
- data/sig/orthoses/writer.rbs +3 -2
- data/sig/orthoses.rbs +6 -6
- metadata +9 -21
- data/Gemfile +0 -16
- data/Gemfile.lock +0 -86
- data/examples/minitest/Rakefile +0 -56
- data/examples/rack-test/Gemfile +0 -8
- data/examples/rack-test/Gemfile.lock +0 -30
- data/examples/rack-test/Rakefile +0 -7
- data/examples/rack-test/generate.rb +0 -31
- data/examples/rack-test/out/rack/test/cookie.rbs +0 -28
- data/examples/rack-test/out/rack/test/cookie_jar.rbs +0 -28
- data/examples/rack-test/out/rack/test/fake_app.rbs +0 -13
- data/examples/rack-test/out/rack/test/input_rewinder.rbs +0 -8
- data/examples/rack-test/out/rack/test/methods.rbs +0 -98
- data/examples/rack-test/out/rack/test/session.rbs +0 -186
- data/examples/rack-test/out/rack/test/uploaded_file.rbs +0 -18
- data/examples/rack-test/out/rack/test/utils.rbs +0 -112
- data/examples/rack-test/out/rack/test.rbs +0 -3
- data/examples/simple_middleware.rb +0 -11
- data/examples/simple_middleware.rbs +0 -7
- data/orthoses.gemspec +0 -36
data/lib/orthoses/mixin.rb
CHANGED
@@ -2,19 +2,31 @@
|
|
2
2
|
|
3
3
|
module Orthoses
|
4
4
|
class Mixin
|
5
|
+
CALL_GRAPH = {}
|
6
|
+
|
5
7
|
module Hook
|
6
8
|
def include(*modules)
|
9
|
+
modules.each do |m|
|
10
|
+
(CALL_GRAPH[self]||=[]) << [:include, m]
|
11
|
+
end
|
7
12
|
super
|
8
13
|
end
|
9
14
|
def extend(*modules)
|
15
|
+
modules.each do |m|
|
16
|
+
(CALL_GRAPH[self]||=[]) << [:extend, m]
|
17
|
+
end
|
10
18
|
super
|
11
19
|
end
|
12
20
|
def prepend(*modules)
|
21
|
+
modules.each do |m|
|
22
|
+
(CALL_GRAPH[self]||=[]) << [:prepend, m]
|
23
|
+
end
|
13
24
|
super
|
14
25
|
end
|
15
26
|
end
|
16
27
|
|
17
28
|
def initialize(loader, if: nil)
|
29
|
+
CALL_GRAPH.clear
|
18
30
|
@loader = loader
|
19
31
|
@if = binding.local_variable_get(:if)
|
20
32
|
end
|
@@ -22,51 +34,34 @@ module Orthoses
|
|
22
34
|
def call
|
23
35
|
::Module.prepend(Hook)
|
24
36
|
|
25
|
-
|
26
|
-
|
27
|
-
|
37
|
+
store = @loader.call
|
38
|
+
|
39
|
+
CALL_GRAPH.dup.each do |base_mod, mixins|
|
40
|
+
base_mod_name = Utils.module_name(base_mod) or next
|
41
|
+
content = store[base_mod_name]
|
42
|
+
mixins.each do |(how, mod)|
|
43
|
+
mod_name = Utils.module_name(mod) or next
|
44
|
+
next if mod_name.start_with?("Orthoses")
|
45
|
+
next unless @if.nil? || @if.call(base_mod, how, mod)
|
28
46
|
|
29
|
-
|
30
|
-
|
31
|
-
prepend.trace(Hook.instance_method(:prepend)) do
|
32
|
-
@loader.call
|
33
|
-
end
|
47
|
+
store[mod_name].header = "module #{mod_name}"
|
48
|
+
content << "#{how} #{mod_name}#{type_params_sig(mod)}"
|
34
49
|
end
|
35
50
|
end
|
36
51
|
|
37
|
-
collect_definitions(store, include, :include)
|
38
|
-
collect_definitions(store, extend, :extend)
|
39
|
-
collect_definitions(store, prepend, :prepend)
|
40
|
-
|
41
52
|
store
|
42
53
|
end
|
43
54
|
|
44
55
|
private
|
45
56
|
|
46
|
-
def
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
base_mod_name = Utils.module_name(base_mod)
|
52
|
-
next unless base_mod_name
|
53
|
-
|
54
|
-
content = store[base_mod_name]
|
55
|
-
capture.argument[:modules].each do |mod|
|
56
|
-
mod_name = Utils.module_name(mod)
|
57
|
-
next unless mod_name
|
58
|
-
|
59
|
-
next if mod_name.start_with?("Orthoses")
|
60
|
-
|
61
|
-
known_type_params = Utils.known_type_params(mod)
|
62
|
-
next unless known_type_params.nil? || known_type_params.empty?
|
63
|
-
|
64
|
-
next unless @if.nil? || @if.call(base_mod, how, mod)
|
65
|
-
|
66
|
-
store[mod_name]
|
67
|
-
content << "#{how} #{mod_name}"
|
57
|
+
def type_params_sig(mod)
|
58
|
+
if type_params = Utils.known_type_params(mod)
|
59
|
+
if !type_params.empty?
|
60
|
+
return "[#{type_params.map{"untyped"}.join(", ")}]"
|
68
61
|
end
|
69
62
|
end
|
63
|
+
|
64
|
+
""
|
70
65
|
end
|
71
66
|
end
|
72
67
|
end
|
@@ -3,18 +3,37 @@ module Orthoses
|
|
3
3
|
# use Orthoses::RBSPrototypeRuntime,
|
4
4
|
# patterns: ['Foo::*']
|
5
5
|
class RBSPrototypeRuntime
|
6
|
-
def initialize(
|
6
|
+
def initialize(
|
7
|
+
loader,
|
8
|
+
patterns: nil,
|
9
|
+
method_definition_filter: nil,
|
10
|
+
alias_filter: nil,
|
11
|
+
constant_filter: nil,
|
12
|
+
mixin_filter: nil,
|
13
|
+
attribute_filter: nil
|
14
|
+
)
|
7
15
|
@loader = loader
|
8
16
|
@patterns = patterns
|
17
|
+
@method_definition_filter = method_definition_filter
|
18
|
+
@alias_filter = alias_filter
|
19
|
+
@constant_filter = constant_filter
|
20
|
+
@mixin_filter = mixin_filter
|
21
|
+
@attribute_filter = attribute_filter
|
9
22
|
end
|
10
23
|
|
11
24
|
def call
|
12
25
|
@loader.call.tap do |store|
|
13
|
-
content_env = Orthoses::Content::Environment.new
|
26
|
+
content_env = Orthoses::Content::Environment.new(
|
27
|
+
method_definition_filter: @method_definition_filter,
|
28
|
+
alias_filter: @alias_filter,
|
29
|
+
constant_filter: @constant_filter,
|
30
|
+
mixin_filter: @mixin_filter,
|
31
|
+
attribute_filter: @attribute_filter,
|
32
|
+
)
|
14
33
|
|
15
|
-
patterns = @patterns
|
34
|
+
patterns = @patterns || store.keys
|
16
35
|
env = RBS::Environment.new
|
17
|
-
merge =
|
36
|
+
merge = false
|
18
37
|
owners_included = []
|
19
38
|
RBS::Prototype::Runtime.new(
|
20
39
|
patterns: patterns,
|
@@ -3,6 +3,24 @@
|
|
3
3
|
module Orthoses
|
4
4
|
class Trace
|
5
5
|
class Attribute
|
6
|
+
module Hook
|
7
|
+
def attr(*names)
|
8
|
+
super
|
9
|
+
end
|
10
|
+
|
11
|
+
def attr_accessor(*names)
|
12
|
+
super
|
13
|
+
end
|
14
|
+
|
15
|
+
def attr_reader(*names)
|
16
|
+
super
|
17
|
+
end
|
18
|
+
|
19
|
+
def attr_writer(*names)
|
20
|
+
super
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
6
24
|
include Targetable
|
7
25
|
|
8
26
|
def initialize(loader, patterns:)
|
@@ -13,17 +31,17 @@ module Orthoses
|
|
13
31
|
end
|
14
32
|
|
15
33
|
def call
|
16
|
-
::Module.prepend(
|
17
|
-
store =
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
34
|
+
::Module.prepend(Hook)
|
35
|
+
store =
|
36
|
+
build_trace_hook.enable(target: Hook.instance_method(:attr)) do
|
37
|
+
build_trace_hook.enable(target: Hook.instance_method(:attr_accessor)) do
|
38
|
+
build_trace_hook.enable(target: Hook.instance_method(:attr_reader)) do
|
39
|
+
build_trace_hook.enable(target: Hook.instance_method(:attr_writer)) do
|
40
|
+
@loader.call
|
41
|
+
end
|
23
42
|
end
|
24
43
|
end
|
25
44
|
end
|
26
|
-
end
|
27
45
|
|
28
46
|
@captured_dict.each do |mod_name, captures|
|
29
47
|
captures.each do |(kind, prefix, name), types|
|
data/lib/orthoses/utils.rb
CHANGED
@@ -177,12 +177,12 @@ module Orthoses
|
|
177
177
|
when String
|
178
178
|
TypeName(name).absolute!
|
179
179
|
when Module
|
180
|
-
module_to_type_name(name)
|
180
|
+
module_to_type_name(name).absolute!
|
181
181
|
else
|
182
182
|
raise TypeError
|
183
183
|
end
|
184
184
|
rbs_environment.class_decls[type_name]&.then do |entry|
|
185
|
-
entry.
|
185
|
+
entry.type_params
|
186
186
|
end
|
187
187
|
end
|
188
188
|
|
data/lib/orthoses/version.rb
CHANGED
data/lib/orthoses.rb
CHANGED
@@ -17,6 +17,7 @@ module Orthoses
|
|
17
17
|
autoload :Mixin, 'orthoses/mixin'
|
18
18
|
autoload :LazyTracePoint, 'orthoses/lazy_trace_point'
|
19
19
|
autoload :LoadRBS, 'orthoses/load_rbs'
|
20
|
+
autoload :MissingName, 'orthoses/missing_name'
|
20
21
|
autoload :ObjectSpaceAll, 'orthoses/object_space_all'
|
21
22
|
autoload :Outputable, 'orthoses/outputable'
|
22
23
|
autoload :PathHelper, 'orthoses/path_helper'
|
data/sig/orthoses/_call.rbs
CHANGED
data/sig/orthoses/attribute.rbs
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
# THIS IS GENERATED CODE from `$ rake
|
1
|
+
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
class Orthoses::Attribute
|
4
|
+
@loader: Orthoses::_Call
|
4
5
|
def initialize: (Orthoses::_Call loader) -> void
|
5
6
|
def call: () -> Orthoses::store
|
6
|
-
|
7
|
-
@loader: Orthoses::_Call
|
7
|
+
CALL_GRAPH: Hash[untyped, untyped]
|
8
8
|
end
|
data/sig/orthoses/autoload.rbs
CHANGED
data/sig/orthoses/builder.rbs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# THIS IS GENERATED CODE from `$ rake
|
1
|
+
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
# Middleware builder like the Rack
|
4
4
|
# Builder.new do
|
@@ -10,9 +10,12 @@
|
|
10
10
|
# run ->() { require 'foo' }
|
11
11
|
# end
|
12
12
|
class Orthoses::Builder
|
13
|
-
|
14
|
-
|
13
|
+
@use: untyped
|
14
|
+
@runner: untyped
|
15
|
+
def initialize: () ?{ () [self: Orthoses::Builder] -> untyped } -> void
|
16
|
+
def use: (untyped middleware, *untyped args, **untyped key) ?{ (*untyped, **untyped) -> untyped } -> untyped
|
15
17
|
def run: (untyped loader) -> untyped
|
18
|
+
def reset_runner: (untyped loader) -> untyped
|
16
19
|
def to_loader: () -> untyped
|
17
|
-
def call: ()
|
20
|
+
def call: () -> Orthoses::store
|
18
21
|
end
|
@@ -1,6 +1,6 @@
|
|
1
|
-
# THIS IS GENERATED CODE from `$ rake
|
1
|
+
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
|
-
class Orthoses::CallTracer::Capture
|
3
|
+
class Orthoses::CallTracer::Capture < ::Struct[untyped]
|
4
4
|
def method: () -> Method
|
5
5
|
def argument: () -> Hash[Symbol, untyped]
|
6
6
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# THIS IS GENERATED CODE from `$ rake
|
1
|
+
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
# CallTracer::Lazy is possible to perform a trace
|
4
4
|
# equivalent to CallTracer before method is defined.
|
@@ -13,7 +13,9 @@
|
|
13
13
|
# capture.argument[:block]
|
14
14
|
# end
|
15
15
|
class Orthoses::CallTracer::Lazy
|
16
|
+
@captures: untyped
|
17
|
+
@lazy_trace_point: untyped
|
16
18
|
def initialize: () -> void
|
17
19
|
def trace: (String name) ?{ () -> untyped } -> untyped
|
18
|
-
attr_reader captures: Array[
|
20
|
+
attr_reader captures: Array[Orthoses::CallTracer::Capture]
|
19
21
|
end
|
@@ -1,6 +1,8 @@
|
|
1
|
-
# THIS IS GENERATED CODE from `$ rake
|
1
|
+
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
class Orthoses::CallTracer
|
4
|
+
@captures: untyped
|
5
|
+
@target_tp: untyped
|
4
6
|
def initialize: () -> void
|
5
7
|
def trace: (Method | UnboundMethod) ?{ () -> untyped } -> untyped
|
6
8
|
attr_accessor captures: Array[Capture]
|
@@ -1,6 +1,9 @@
|
|
1
|
-
# THIS IS GENERATED CODE from `$ rake
|
1
|
+
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
class Orthoses::ConstLoadError < ::StandardError
|
4
|
+
@root: untyped
|
5
|
+
@const: untyped
|
6
|
+
@error: untyped
|
4
7
|
def initialize: (root: Module, const: Symbol, error: untyped) -> void
|
5
8
|
def message: () -> ::String
|
6
9
|
attr_reader root: Module
|
data/sig/orthoses/constant.rbs
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
# THIS IS GENERATED CODE from `$ rake
|
1
|
+
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
class Orthoses::Constant
|
4
|
-
def initialize: (Orthoses::_Call loader, ?strict: bool, ?if: ^(Module, Symbol, untyped) -> boolish | nil, ?on_error: ^(Orthoses::ConstLoadError) -> void | nil) -> void
|
5
|
-
def call: () -> Orthoses::store
|
6
4
|
@loader: Orthoses::_Call
|
7
5
|
@strict: bool
|
8
6
|
@if: ^(Module mod, Symbol const, untyped val, String rbs) -> boolish?
|
9
7
|
@on_error: ^(Orthoses::ConstLoadError) -> void | nil
|
8
|
+
def initialize: (Orthoses::_Call loader, ?strict: bool, ?if: ^(Module, Symbol, untyped) -> boolish | nil, ?on_error: ^(Orthoses::ConstLoadError) -> void | nil) -> void
|
9
|
+
def call: () -> Orthoses::store
|
10
10
|
end
|
@@ -1,11 +1,18 @@
|
|
1
|
-
# THIS IS GENERATED CODE from `$ rake
|
1
|
+
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
# Check and drop duplication method, const etc...
|
4
4
|
class Orthoses::Content::DuplicationChecker
|
5
|
+
@decl: untyped
|
6
|
+
@known_env: untyped
|
7
|
+
@builder: untyped
|
8
|
+
@uniq_map: untyped
|
5
9
|
def initialize: (untyped decl, ?env: untyped?) -> void
|
6
10
|
def update_decl: () -> (nil | untyped)
|
7
11
|
private def uniq_members: () -> untyped
|
8
|
-
private def
|
9
|
-
private def
|
12
|
+
private def drop_by_singleton_instance: () -> untyped
|
13
|
+
private def drop_set_method_definition: () -> untyped
|
14
|
+
private def drop_known_method_definition: () -> untyped
|
15
|
+
private def drop_known_method_definition_recur: (untyped d) -> untyped
|
16
|
+
private def drop_known_const_definition: () -> untyped
|
10
17
|
private def member_key: (untyped member) -> untyped
|
11
18
|
end
|
@@ -1,8 +1,15 @@
|
|
1
|
-
# THIS IS GENERATED CODE from `$ rake
|
1
|
+
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
class Orthoses::Content::Environment
|
4
|
+
@load_env: RBS::Environment
|
5
|
+
@known_env: RBS::Environment
|
6
|
+
@method_definition_filter: method_definition_filter?
|
7
|
+
@alias_filter: alias_filter?
|
8
|
+
@constant_filter: constant_filter?
|
9
|
+
@mixin_filter: mixin_filter?
|
10
|
+
@attribute_filter: attribute_filter?
|
4
11
|
def self.load_from_paths: (untyped paths) -> untyped
|
5
|
-
def initialize: (?constant_filter: constant_filter?, ?mixin_filter: mixin_filter?, ?attribute_filter: attribute_filter?) -> void
|
12
|
+
def initialize: (?method_definition_filter: method_definition_filter?, ?alias_filter: alias_filter?, ?constant_filter: constant_filter?, ?mixin_filter: mixin_filter?, ?attribute_filter: attribute_filter?) -> void
|
6
13
|
def <<: (RBS::AST::Declarations::t decl) -> RBS::Environment
|
7
14
|
def write_to: (store: Orthoses::store) -> void
|
8
15
|
def each: () { (Orthoses::Content) -> void } -> void
|
@@ -11,11 +18,9 @@ class Orthoses::Content::Environment
|
|
11
18
|
# end
|
12
19
|
private def avoid_generic_parameter_mismatch_error: () -> untyped
|
13
20
|
private def decls_to_lines: (untyped decls) -> untyped
|
21
|
+
type method_definition_filter = ^(RBS::AST::Members::MethodDefinition) -> boolish
|
22
|
+
type alias_filter = ^(RBS::AST::Members::Alias) -> boolish
|
14
23
|
type constant_filter = ^(RBS::AST::Declarations::Constant) -> boolish
|
15
24
|
type mixin_filter = ^(RBS::AST::Members::Mixin) -> boolish
|
16
25
|
type attribute_filter = ^(RBS::AST::Members::Attribute) -> boolish
|
17
|
-
@env: RBS::Environment
|
18
|
-
@constant_filter: constant_filter?
|
19
|
-
@mixin_filter: mixin_filter?
|
20
|
-
@attribute_filter: attribute_filter?
|
21
26
|
end
|
@@ -1,6 +1,8 @@
|
|
1
|
-
# THIS IS GENERATED CODE from `$ rake
|
1
|
+
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
class Orthoses::Content::HeaderBuilder
|
4
|
+
@env: untyped
|
5
|
+
@resolver: untyped
|
4
6
|
def initialize: (env: untyped) -> void
|
5
7
|
def build: (entry: untyped, ?name_hint: untyped?) -> untyped
|
6
8
|
private def build_module: (entry: untyped, ?name_hint: untyped?) -> ::String
|
data/sig/orthoses/content.rbs
CHANGED
@@ -1,6 +1,10 @@
|
|
1
|
-
# THIS IS GENERATED CODE from `$ rake
|
1
|
+
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
class Orthoses::Content
|
4
|
+
@name: untyped
|
5
|
+
@body: untyped
|
6
|
+
@header: untyped
|
7
|
+
@comment: untyped
|
4
8
|
def initialize: (name: String) -> void
|
5
9
|
def <<: (String) -> void
|
6
10
|
def concat: (Array[String]) -> void
|
@@ -13,6 +17,7 @@ class Orthoses::Content
|
|
13
17
|
def sort!: () -> untyped
|
14
18
|
def original_rbs: () -> untyped
|
15
19
|
def auto_header: () -> (nil | untyped)
|
20
|
+
private def build_super_class: (untyped val) -> (nil | ::String)
|
16
21
|
private def decl_to_lines: (untyped decl) -> untyped
|
17
22
|
private def uniqed_body_string: () -> String
|
18
23
|
private def uniqed_body_decl: () -> RBS::AST::Declarations::t
|
@@ -21,4 +26,5 @@ class Orthoses::Content
|
|
21
26
|
attr_reader name: String
|
22
27
|
attr_reader body: Array[String]
|
23
28
|
attr_accessor header: String?
|
29
|
+
attr_accessor comment: String?
|
24
30
|
end
|
@@ -1,7 +1,12 @@
|
|
1
|
-
# THIS IS GENERATED CODE from `$ rake
|
1
|
+
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
class Orthoses::CreateFileByName
|
4
|
-
def initialize: (Orthoses::_Call loader, base_dir: String, ?header: String?) -> void
|
5
|
-
def call: () -> Orthoses::store
|
6
4
|
@loader: Orthoses::_Call
|
5
|
+
@to: untyped
|
6
|
+
@header: untyped
|
7
|
+
@depth: untyped
|
8
|
+
@rmtree: untyped
|
9
|
+
@if: untyped
|
10
|
+
def initialize: (Orthoses::_Call loader, to: String, ?header: String?, ?depth: Integer?, ?rmtree: boolish) -> void
|
11
|
+
def call: () -> Orthoses::store
|
7
12
|
end
|
@@ -1,8 +1,8 @@
|
|
1
|
-
# THIS IS GENERATED CODE from `$ rake
|
1
|
+
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
class Orthoses::DelegateClass
|
4
|
+
@loader: Orthoses::_Call
|
4
5
|
def initialize: (Orthoses::_Call loader) -> void
|
5
6
|
def call: () -> Orthoses::store
|
6
7
|
def temporary_type_params: (untyped name) -> untyped
|
7
|
-
@loader: Orthoses::_Call
|
8
8
|
end
|
data/sig/orthoses/filter.rbs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# THIS IS GENERATED CODE from `$ rake
|
1
|
+
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
# Filter current store.
|
4
4
|
# filter stored key and value if proc return true
|
@@ -6,8 +6,9 @@
|
|
6
6
|
# Orthoses.rbs_defined_class?(name)
|
7
7
|
# end
|
8
8
|
class Orthoses::Filter
|
9
|
-
def initialize: (Orthoses::_Call loader) { (String, Orthoses::Content) -> boolish } -> void
|
10
|
-
def call: () -> Orthoses::store
|
11
9
|
@loader: Orthoses::_Call
|
10
|
+
@if: untyped
|
12
11
|
@block: ^(String, Orthoses::Content) -> boolish
|
12
|
+
def initialize: (Orthoses::_Call loader) { (String, Orthoses::Content) -> boolish } -> void
|
13
|
+
def call: () -> Orthoses::store
|
13
14
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# THIS IS GENERATED CODE from `$ rake
|
1
|
+
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
# TracePoint wrapper that allows setting hooks
|
4
4
|
# even if the target is undefined
|
@@ -9,15 +9,15 @@
|
|
9
9
|
# ...
|
10
10
|
# end
|
11
11
|
class Orthoses::LazyTracePoint < ::TracePoint
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
def enable: (?target: untyped
|
12
|
+
@mod_name: untyped
|
13
|
+
@instance_method_id: untyped
|
14
|
+
@singleton_method_id: untyped
|
15
|
+
def enable: (?target: untyped?) ?{ () -> untyped } -> untyped
|
16
16
|
private def trace_instance_method: () ?{ () -> untyped } -> untyped
|
17
17
|
private def trace_singleton_method: () ?{ () -> untyped } -> untyped
|
18
18
|
INSTANCE_METHOD_METHOD: UnboundMethod
|
19
|
-
|
19
|
+
METHOD_ADDED_HOOKS: Hash[untyped, untyped]
|
20
20
|
METHOD_METHOD: UnboundMethod
|
21
|
-
|
21
|
+
SINGLETON_METHOD_ADDED_HOOKS: Hash[untyped, untyped]
|
22
22
|
UNBOUND_NAME_METHOD: UnboundMethod
|
23
23
|
end
|
data/sig/orthoses/load_rbs.rbs
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
# THIS IS GENERATED CODE from `$ rake
|
1
|
+
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
class Orthoses::LoadRBS
|
4
|
+
@loader: Orthoses::_Call
|
5
|
+
@paths: paths
|
4
6
|
def initialize: (Orthoses::_Call loader, paths: paths) -> void
|
5
7
|
def call: () -> Orthoses::store
|
6
8
|
type paths = Array[String] | ^() -> Array[String]
|
7
|
-
@loader: Orthoses::_Call
|
8
|
-
@paths: paths
|
9
9
|
end
|
data/sig/orthoses/mixin/hook.rbs
CHANGED
data/sig/orthoses/mixin.rbs
CHANGED
@@ -1,8 +1,10 @@
|
|
1
|
-
# THIS IS GENERATED CODE from `$ rake
|
1
|
+
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
class Orthoses::Mixin
|
4
|
-
def initialize: (Orthoses::_Call loader) -> void
|
5
|
-
def call: () -> Orthoses::store
|
6
|
-
private def collect_definitions: (Orthoses::store store, Orthoses::CallTracer call_tracer, :include | :extend | :prepend how) -> void
|
7
4
|
@loader: Orthoses::_Call
|
5
|
+
@if: untyped
|
6
|
+
def initialize: (Orthoses::_Call loader, ?if: nil | ^(Module base_mod, :include | :extend | :prepend how, Module mod) -> boolish) -> void
|
7
|
+
def call: () -> Orthoses::store
|
8
|
+
private def type_params_sig: (untyped mod) -> String
|
9
|
+
CALL_GRAPH: Hash[untyped, [ :include | :extend | :prepend, untyped ]]
|
8
10
|
end
|