raap 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/raap/cli.rb +4 -2
- data/lib/raap/symbolic_caller.rb +10 -2
- data/lib/raap/type.rb +1 -1
- data/lib/raap/version.rb +1 -1
- metadata +3 -12
- data/.rubocop.yml +0 -33
- data/Rakefile +0 -19
- data/Steepfile +0 -4
- data/public/example.webp +0 -0
- data/public/jacket.webp +0 -0
- data/rbs_collection.lock.yaml +0 -128
- data/rbs_collection.yaml +0 -19
- data/sig/raap.rbs +0 -380
- data/sig/shims.rbs +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8b20f587b1dff6f9c33beb9e3dd237f130bc260be25f4932cde3a24cc9e795a
|
4
|
+
data.tar.gz: 9080f6e301291b4d0c88a89d640635c900d610ef4886664221f3e056e1694c45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35ba388b95030f3bdd79a7050b26d0ef5fe607f2e98596d61c1a8f49630f3bfb301309cac19c0c0bf95c047b042ffa1a0ffd24985259beff7d0bc49fecb19529
|
7
|
+
data.tar.gz: f23bc8a43bd6b7f1295c28b05e0242cf966a589a79f806007d90f468562128ae47e25b8440aaa2be8f3dea2149d7986cedd23b38008eef6f71bccb1f1c0842ab
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.8.0] - 2024-06-09
|
4
|
+
|
5
|
+
* Function of interface should not log coverage by @ksss in https://github.com/ksss/raap/pull/11
|
6
|
+
* Type-checking block arguments by @ksss in https://github.com/ksss/raap/pull/12
|
7
|
+
* Read options directly by @ksss in https://github.com/ksss/raap/pull/13
|
8
|
+
* Return value is not checked by @ksss in https://github.com/ksss/raap/pull/14
|
9
|
+
|
3
10
|
## [0.1.0] - 2024-03-20
|
4
11
|
|
5
12
|
- Initial release
|
data/lib/raap/cli.rb
CHANGED
@@ -52,6 +52,8 @@ module RaaP
|
|
52
52
|
|
53
53
|
def load
|
54
54
|
OptionParser.new do |o|
|
55
|
+
o.version = RaaP::VERSION
|
56
|
+
|
55
57
|
o.on('-I', '--include PATH') do |path|
|
56
58
|
RaaP::RBS.loader.add(path: Pathname(path))
|
57
59
|
end
|
@@ -223,7 +225,7 @@ module RaaP
|
|
223
225
|
type_args = type.args
|
224
226
|
|
225
227
|
definition = RBS.builder.build_singleton(type_name)
|
226
|
-
type_params_decl = definition.type_params_decl
|
228
|
+
type_params_decl = definition.type_params_decl.freeze
|
227
229
|
definition.methods.each do |method_name, method|
|
228
230
|
if @skip.include?("#{type_name.absolute!}.#{method_name}")
|
229
231
|
RaaP.logger.info("Skip #{"#{type_name.absolute!}.#{method_name}"}")
|
@@ -243,7 +245,7 @@ module RaaP
|
|
243
245
|
end
|
244
246
|
|
245
247
|
definition = RBS.builder.build_instance(type_name)
|
246
|
-
type_params_decl = definition.type_params_decl
|
248
|
+
type_params_decl = definition.type_params_decl.freeze
|
247
249
|
definition.methods.each do |method_name, method|
|
248
250
|
if @skip.include?("#{type_name.absolute!}##{method_name}")
|
249
251
|
RaaP.logger.info("Skip #{"#{type_name.absolute!}.#{method_name}"}")
|
data/lib/raap/symbolic_caller.rb
CHANGED
@@ -148,9 +148,17 @@ module RaaP
|
|
148
148
|
def eval_one(symbolic_call)
|
149
149
|
symbolic_call => [:call, receiver_value, method_name, args, kwargs, block]
|
150
150
|
if @allow_private
|
151
|
-
|
151
|
+
if kwargs.empty?
|
152
|
+
receiver_value.__send__(method_name, *args, &block)
|
153
|
+
else
|
154
|
+
receiver_value.__send__(method_name, *args, **kwargs, &block)
|
155
|
+
end
|
152
156
|
else
|
153
|
-
|
157
|
+
if kwargs.empty?
|
158
|
+
BindCall.public_send(receiver_value, method_name, *args, &block)
|
159
|
+
else
|
160
|
+
BindCall.public_send(receiver_value, method_name, *args, **kwargs, &block)
|
161
|
+
end
|
154
162
|
end
|
155
163
|
end
|
156
164
|
|
data/lib/raap/type.rb
CHANGED
@@ -47,7 +47,7 @@ module RaaP
|
|
47
47
|
if snew
|
48
48
|
# class
|
49
49
|
rbs_method_type = snew.method_types.sample or raise
|
50
|
-
type_params = definition.type_params_decl.concat(rbs_method_type.type_params.drop(definition.type_params_decl.length))
|
50
|
+
type_params = definition.type_params_decl.dup.concat(rbs_method_type.type_params.drop(definition.type_params_decl.length))
|
51
51
|
ts = TypeSubstitution.new(type_params, type.args)
|
52
52
|
maped_rbs_method_type = ts.method_type_sub(rbs_method_type)
|
53
53
|
method_type = MethodType.new(maped_rbs_method_type)
|
data/lib/raap/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: raap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ksss
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rbs
|
@@ -46,13 +46,10 @@ executables:
|
|
46
46
|
extensions: []
|
47
47
|
extra_rdoc_files: []
|
48
48
|
files:
|
49
|
-
- ".rubocop.yml"
|
50
49
|
- CHANGELOG.md
|
51
50
|
- CODE_OF_CONDUCT.md
|
52
51
|
- LICENSE.txt
|
53
52
|
- README.md
|
54
|
-
- Rakefile
|
55
|
-
- Steepfile
|
56
53
|
- exe/raap
|
57
54
|
- lib/raap.rb
|
58
55
|
- lib/raap/bind_call.rb
|
@@ -78,12 +75,6 @@ files:
|
|
78
75
|
- lib/raap/value/void.rb
|
79
76
|
- lib/raap/version.rb
|
80
77
|
- lib/shims.rb
|
81
|
-
- public/example.webp
|
82
|
-
- public/jacket.webp
|
83
|
-
- rbs_collection.lock.yaml
|
84
|
-
- rbs_collection.yaml
|
85
|
-
- sig/raap.rbs
|
86
|
-
- sig/shims.rbs
|
87
78
|
homepage: https://github.com/ksss/raap
|
88
79
|
licenses:
|
89
80
|
- MIT
|
@@ -97,7 +88,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
97
88
|
requirements:
|
98
89
|
- - ">="
|
99
90
|
- !ruby/object:Gem::Version
|
100
|
-
version: 3.
|
91
|
+
version: 3.1.0
|
101
92
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
93
|
requirements:
|
103
94
|
- - ">="
|
data/.rubocop.yml
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
AllCops:
|
2
|
-
TargetRubyVersion: 3.0
|
3
|
-
NewCops: enable
|
4
|
-
Include:
|
5
|
-
- 'lib/**/*.rb'
|
6
|
-
|
7
|
-
Lint:
|
8
|
-
Enabled: true
|
9
|
-
Lint/EmptyBlock:
|
10
|
-
Enabled: false
|
11
|
-
Lint/SymbolConversion:
|
12
|
-
Enabled: false
|
13
|
-
|
14
|
-
Style:
|
15
|
-
Enabled: false
|
16
|
-
Style/HashSyntax:
|
17
|
-
EnforcedShorthandSyntax: always
|
18
|
-
Enabled: true
|
19
|
-
Style/FrozenStringLiteralComment:
|
20
|
-
Enabled: true
|
21
|
-
|
22
|
-
Metrics:
|
23
|
-
Enabled: false
|
24
|
-
|
25
|
-
Layout:
|
26
|
-
Enabled: true
|
27
|
-
Layout/FirstArrayElementIndentation:
|
28
|
-
EnforcedStyle: consistent
|
29
|
-
Layout/LineLength:
|
30
|
-
Max: 150
|
31
|
-
|
32
|
-
Naming:
|
33
|
-
Enabled: false
|
data/Rakefile
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "bundler/gem_tasks"
|
4
|
-
require "minitest/test_task"
|
5
|
-
require "rubocop/rake_task"
|
6
|
-
|
7
|
-
Minitest::TestTask.create do |t|
|
8
|
-
t.test_prelude = 'require "test/test_helper"'
|
9
|
-
end
|
10
|
-
|
11
|
-
RuboCop::RakeTask.new
|
12
|
-
|
13
|
-
namespace :steep do
|
14
|
-
task :check do
|
15
|
-
sh "bundle exec steep check"
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
task default: [:test, :rubocop, 'steep:check']
|
data/Steepfile
DELETED
data/public/example.webp
DELETED
Binary file
|
data/public/jacket.webp
DELETED
Binary file
|
data/rbs_collection.lock.yaml
DELETED
@@ -1,128 +0,0 @@
|
|
1
|
-
---
|
2
|
-
path: ".gem_rbs_collection"
|
3
|
-
gems:
|
4
|
-
- name: abbrev
|
5
|
-
version: '0'
|
6
|
-
source:
|
7
|
-
type: stdlib
|
8
|
-
- name: activesupport
|
9
|
-
version: '7.0'
|
10
|
-
source:
|
11
|
-
type: git
|
12
|
-
name: ruby/gem_rbs_collection
|
13
|
-
revision: d2e93d426c927fdab90ef12e30a9875aa05d60d6
|
14
|
-
remote: https://github.com/ruby/gem_rbs_collection.git
|
15
|
-
repo_dir: gems
|
16
|
-
- name: base64
|
17
|
-
version: '0'
|
18
|
-
source:
|
19
|
-
type: stdlib
|
20
|
-
- name: bigdecimal
|
21
|
-
version: '0'
|
22
|
-
source:
|
23
|
-
type: stdlib
|
24
|
-
- name: concurrent-ruby
|
25
|
-
version: '1.1'
|
26
|
-
source:
|
27
|
-
type: git
|
28
|
-
name: ruby/gem_rbs_collection
|
29
|
-
revision: d2e93d426c927fdab90ef12e30a9875aa05d60d6
|
30
|
-
remote: https://github.com/ruby/gem_rbs_collection.git
|
31
|
-
repo_dir: gems
|
32
|
-
- name: connection_pool
|
33
|
-
version: '2.4'
|
34
|
-
source:
|
35
|
-
type: git
|
36
|
-
name: ruby/gem_rbs_collection
|
37
|
-
revision: d2e93d426c927fdab90ef12e30a9875aa05d60d6
|
38
|
-
remote: https://github.com/ruby/gem_rbs_collection.git
|
39
|
-
repo_dir: gems
|
40
|
-
- name: date
|
41
|
-
version: '0'
|
42
|
-
source:
|
43
|
-
type: stdlib
|
44
|
-
- name: erb
|
45
|
-
version: '0'
|
46
|
-
source:
|
47
|
-
type: stdlib
|
48
|
-
- name: fileutils
|
49
|
-
version: '0'
|
50
|
-
source:
|
51
|
-
type: stdlib
|
52
|
-
- name: i18n
|
53
|
-
version: '1.10'
|
54
|
-
source:
|
55
|
-
type: git
|
56
|
-
name: ruby/gem_rbs_collection
|
57
|
-
revision: d2e93d426c927fdab90ef12e30a9875aa05d60d6
|
58
|
-
remote: https://github.com/ruby/gem_rbs_collection.git
|
59
|
-
repo_dir: gems
|
60
|
-
- name: io-console
|
61
|
-
version: '0'
|
62
|
-
source:
|
63
|
-
type: stdlib
|
64
|
-
- name: json
|
65
|
-
version: '0'
|
66
|
-
source:
|
67
|
-
type: stdlib
|
68
|
-
- name: logger
|
69
|
-
version: '0'
|
70
|
-
source:
|
71
|
-
type: stdlib
|
72
|
-
- name: minitest
|
73
|
-
version: '0'
|
74
|
-
source:
|
75
|
-
type: stdlib
|
76
|
-
- name: monitor
|
77
|
-
version: '0'
|
78
|
-
source:
|
79
|
-
type: stdlib
|
80
|
-
- name: mutex_m
|
81
|
-
version: '0'
|
82
|
-
source:
|
83
|
-
type: stdlib
|
84
|
-
- name: optparse
|
85
|
-
version: '0'
|
86
|
-
source:
|
87
|
-
type: stdlib
|
88
|
-
- name: pathname
|
89
|
-
version: '0'
|
90
|
-
source:
|
91
|
-
type: stdlib
|
92
|
-
- name: rake
|
93
|
-
version: '13.0'
|
94
|
-
source:
|
95
|
-
type: git
|
96
|
-
name: ruby/gem_rbs_collection
|
97
|
-
revision: d2e93d426c927fdab90ef12e30a9875aa05d60d6
|
98
|
-
remote: https://github.com/ruby/gem_rbs_collection.git
|
99
|
-
repo_dir: gems
|
100
|
-
- name: rbs
|
101
|
-
version: 3.4.4
|
102
|
-
source:
|
103
|
-
type: rubygems
|
104
|
-
- name: rdoc
|
105
|
-
version: '0'
|
106
|
-
source:
|
107
|
-
type: stdlib
|
108
|
-
- name: securerandom
|
109
|
-
version: '0'
|
110
|
-
source:
|
111
|
-
type: stdlib
|
112
|
-
- name: singleton
|
113
|
-
version: '0'
|
114
|
-
source:
|
115
|
-
type: stdlib
|
116
|
-
- name: time
|
117
|
-
version: '0'
|
118
|
-
source:
|
119
|
-
type: stdlib
|
120
|
-
- name: timeout
|
121
|
-
version: '0'
|
122
|
-
source:
|
123
|
-
type: stdlib
|
124
|
-
- name: tsort
|
125
|
-
version: '0'
|
126
|
-
source:
|
127
|
-
type: stdlib
|
128
|
-
gemfile_lock_path: Gemfile.lock
|
data/rbs_collection.yaml
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
# Download sources
|
2
|
-
sources:
|
3
|
-
- type: git
|
4
|
-
name: ruby/gem_rbs_collection
|
5
|
-
remote: https://github.com/ruby/gem_rbs_collection.git
|
6
|
-
revision: main
|
7
|
-
repo_dir: gems
|
8
|
-
|
9
|
-
# You can specify local directories as sources also.
|
10
|
-
# - type: local
|
11
|
-
# path: path/to/your/local/repository
|
12
|
-
|
13
|
-
# A directory to install the downloaded RBSs
|
14
|
-
path: .gem_rbs_collection
|
15
|
-
|
16
|
-
gems:
|
17
|
-
- name: activesupport
|
18
|
-
- name: steep
|
19
|
-
ignore: true
|
data/sig/raap.rbs
DELETED
@@ -1,380 +0,0 @@
|
|
1
|
-
module RaaP
|
2
|
-
type symbolic_call = [:call, untyped, Symbol, Array[untyped], Hash[Symbol, untyped], Proc?]
|
3
|
-
VERSION: String
|
4
|
-
|
5
|
-
def self.logger: () -> ::Logger
|
6
|
-
def self.logger=: (::Logger) -> void
|
7
|
-
|
8
|
-
module BindCall
|
9
|
-
def self.define_method: (untyped, Symbol) { (*untyped, **untyped) -> untyped } -> void
|
10
|
-
def self.respond_to?: (untyped, untyped, ?boolish) -> bool
|
11
|
-
def self.instance_of?: (untyped, Module) -> bool
|
12
|
-
def self.is_a?: (untyped, Module) -> bool
|
13
|
-
def self.extend: (untyped, Module) -> void
|
14
|
-
def self.name: (Module) -> String?
|
15
|
-
def self.to_s: (untyped) -> String
|
16
|
-
def self.class: (untyped) -> untyped
|
17
|
-
def self.inspect: (untyped) -> String
|
18
|
-
end
|
19
|
-
|
20
|
-
class CLI
|
21
|
-
class Option < ::Struct[untyped]
|
22
|
-
def self.new: (?timeout: (Integer | Float | nil), ?size_from: ::Integer, ?size_to: ::Integer, ?size_by: ::Integer, ?allow_private: bool, ?coverage: bool) -> instance
|
23
|
-
|
24
|
-
def self.[]: (?timeout: (Integer | Float | nil), ?size_from: ::Integer, ?size_to: ::Integer, ?size_by: ::Integer, ?allow_private: bool, ?coverage: bool) -> instance
|
25
|
-
|
26
|
-
def self.keyword_init?: () -> true
|
27
|
-
|
28
|
-
def self.members: () -> [ :timeout, :size_from, :size_to, :size_by, :allow_private, :coverage]
|
29
|
-
|
30
|
-
def members: () -> [ :timeout, :size_from, :size_to, :size_by, :allow_private, :coverage]
|
31
|
-
|
32
|
-
attr_accessor timeout: (Integer | Float | nil)
|
33
|
-
|
34
|
-
attr_accessor size_from: ::Integer
|
35
|
-
|
36
|
-
attr_accessor size_to: ::Integer
|
37
|
-
|
38
|
-
attr_accessor size_by: ::Integer
|
39
|
-
|
40
|
-
attr_accessor allow_private: bool
|
41
|
-
|
42
|
-
attr_accessor coverage: bool
|
43
|
-
end
|
44
|
-
|
45
|
-
type property_result = [Integer, Symbol, ::RBS::MethodType, StringIO?]
|
46
|
-
|
47
|
-
DEFAULT_SKIP: ::Set[String]
|
48
|
-
|
49
|
-
@argv: Array[String]
|
50
|
-
@option: Option
|
51
|
-
@results: Array[{ method: ::RBS::Definition::Method, properties: Array[property_result] }]
|
52
|
-
@skip: ::Set[::String]
|
53
|
-
|
54
|
-
def self.option: () -> Option
|
55
|
-
def self.option=: (Option) -> void
|
56
|
-
|
57
|
-
def initialize: (Array[String]) -> void
|
58
|
-
def load: () -> self
|
59
|
-
def run: () -> Integer
|
60
|
-
|
61
|
-
private
|
62
|
-
|
63
|
-
def run_by: (kind: (:instance | :singleton), tag: String) -> void
|
64
|
-
def run_by_type_name: (tag: String) -> void
|
65
|
-
def run_by_type_name_with_search: (tag: String) -> void
|
66
|
-
def property: (receiver_type: Type, type_params_decl: Array[::RBS::AST::TypeParam], type_args: Array[::RBS::Types::t], method_name: Symbol, method_type: ::RBS::MethodType) -> property_result
|
67
|
-
def report: () -> Integer
|
68
|
-
end
|
69
|
-
|
70
|
-
module Coverage
|
71
|
-
type locs = [::RBS::Buffer::loc, ::RBS::Buffer::loc]
|
72
|
-
class Writer
|
73
|
-
@method_type: ::RBS::MethodType
|
74
|
-
@cov: ::Set[Symbol]
|
75
|
-
@cur: Integer
|
76
|
-
|
77
|
-
def initialize: (::RBS::MethodType, Set[Symbol]) -> void
|
78
|
-
def write: (IO) -> void
|
79
|
-
|
80
|
-
private
|
81
|
-
|
82
|
-
def method_type_location: () -> ::RBS::Location[untyped, untyped]
|
83
|
-
def slice: (Integer, Range[Integer]) -> String
|
84
|
-
def write_param: (IO, String, ::RBS::Types::Function::Param) -> void
|
85
|
-
def write_type: (IO, String, ::RBS::Types::t) -> void
|
86
|
-
def green: (String) -> String
|
87
|
-
def red: (String) -> String
|
88
|
-
end
|
89
|
-
|
90
|
-
self.@cov: Set[Symbol]?
|
91
|
-
self.@method_type: ::RBS::MethodType
|
92
|
-
|
93
|
-
def self.start: (::RBS::MethodType) -> void
|
94
|
-
def self.running?: () -> bool
|
95
|
-
def self.log: (String | Symbol) -> void
|
96
|
-
def self.cov: () -> Set[Symbol]
|
97
|
-
def self.show: (IO) -> void
|
98
|
-
def self.new_type_with_log: (String, ::RBS::Types::t) -> Type
|
99
|
-
def self.log_with_type: (String, ::RBS::Types::t) -> nil
|
100
|
-
| (String, ::RBS::Types::t) ?{ (::RBS::Types::t) -> Type } -> Type
|
101
|
-
end
|
102
|
-
|
103
|
-
class FunctionType
|
104
|
-
@fun: ::RBS::Types::Function
|
105
|
-
@coverage: boolish
|
106
|
-
|
107
|
-
def initialize: (::RBS::Types::Function, ?coverage: boolish) -> void
|
108
|
-
def pick_arguments: (?size: Integer) -> [Array[untyped], Hash[Symbol, untyped]]
|
109
|
-
def arguments_to_symbolic_call: (?size: Integer) -> [Array[untyped], Hash[Symbol, untyped]]
|
110
|
-
|
111
|
-
private
|
112
|
-
|
113
|
-
def to_symbolic_call_recursive: (untyped, size: Integer) -> untyped
|
114
|
-
def build_args_type: () -> Array[Type]
|
115
|
-
def build_kwargs_type: () -> Hash[Symbol, Type]
|
116
|
-
def build_type_with_coverage: (String, ::RBS::Types::Function::Param) -> Type
|
117
|
-
end
|
118
|
-
|
119
|
-
class MethodProperty
|
120
|
-
class Stats
|
121
|
-
attr_accessor success: Integer
|
122
|
-
attr_accessor skip: Integer
|
123
|
-
attr_accessor exception: Integer
|
124
|
-
attr_accessor break: bool
|
125
|
-
end
|
126
|
-
|
127
|
-
@receiver_type: Type
|
128
|
-
@method_name: Symbol
|
129
|
-
@method_type: MethodType
|
130
|
-
@size_step: _Each[Integer]
|
131
|
-
@timeout: (Integer | Float | nil)
|
132
|
-
@allow_private: bool
|
133
|
-
|
134
|
-
def initialize: (receiver_type: Type, method_name: Symbol, method_type: MethodType, size_step: _Each[Integer], timeout: (Integer | Float | nil), ?allow_private: bool) -> void
|
135
|
-
def run: () { (Result::Success | Result::Failure | Result::Skip | Result::Exception) -> void } -> Stats
|
136
|
-
|
137
|
-
private
|
138
|
-
|
139
|
-
def call: (size: Integer, stats: Stats) -> (Result::Success | Result::Failure | Result::Skip | Result::Exception)
|
140
|
-
def check_return: (receiver_value: untyped, return_value: untyped) -> ([Symbol] | [Symbol, Exception])
|
141
|
-
def return_type: () -> RBS::Types::t
|
142
|
-
def original_return_type: () -> RBS::Types::t
|
143
|
-
def coverage: (String, untyped, RBS::Types::t, ?RBS::Test::TypeCheck?) -> void
|
144
|
-
end
|
145
|
-
|
146
|
-
class MethodType
|
147
|
-
attr_reader rbs: ::RBS::MethodType
|
148
|
-
@fun_type: FunctionType
|
149
|
-
@type_check: ::RBS::Test::TypeCheck
|
150
|
-
|
151
|
-
def initialize: (::RBS::MethodType | String method, ?type_params_decl: Array[untyped], ?type_args: Array[untyped], ?self_type: ::RBS::Types::ClassInstance?, ?instance_type: ::RBS::Types::ClassInstance?, ?class_type: ::RBS::Types::ClassSingleton?) -> void
|
152
|
-
def pick_arguments: (?size: Integer) -> [Array[untyped], Hash[Symbol, untyped], ::Proc?]
|
153
|
-
def arguments_to_symbolic_call: (?size: Integer) -> [Array[untyped], Hash[Symbol, untyped], ::Proc?]
|
154
|
-
def pick_block: (?size: Integer) -> ::Proc?
|
155
|
-
def check_return: (untyped) -> bool
|
156
|
-
end
|
157
|
-
|
158
|
-
module Minitest
|
159
|
-
end
|
160
|
-
|
161
|
-
module RBS
|
162
|
-
self.@builder: ::RBS::DefinitionBuilder
|
163
|
-
self.@env: ::RBS::Environment
|
164
|
-
self.@loader: ::RBS::EnvironmentLoader
|
165
|
-
|
166
|
-
def self.builder: () -> ::RBS::DefinitionBuilder
|
167
|
-
def self.env: () -> ::RBS::Environment
|
168
|
-
def self.loader: () -> ::RBS::EnvironmentLoader
|
169
|
-
def self.parse_type: (String) -> ::RBS::Types::t
|
170
|
-
def self.parse_method_type: (String) -> ::RBS::MethodType
|
171
|
-
def self.parse_member: (String) -> ::RBS::AST::Members::Attribute
|
172
|
-
def self._shift_location: (untyped, Integer) -> void
|
173
|
-
def self.find_alias_decl: (::RBS::TypeName, Symbol) -> ::RBS::AST::Members::Alias?
|
174
|
-
end
|
175
|
-
|
176
|
-
module Result
|
177
|
-
interface _ReturnValue
|
178
|
-
def return_value: () -> untyped
|
179
|
-
end
|
180
|
-
|
181
|
-
module ReturnValueWithType : _ReturnValue
|
182
|
-
def return_value_with_type: () -> String
|
183
|
-
|
184
|
-
private
|
185
|
-
|
186
|
-
def return_value_to_type: (untyped) -> String
|
187
|
-
end
|
188
|
-
|
189
|
-
class Success < Data
|
190
|
-
include ReturnValueWithType
|
191
|
-
def self.new: (symbolic_call: symbolic_call, return_value: untyped) -> instance
|
192
|
-
attr_reader symbolic_call: symbolic_call
|
193
|
-
attr_reader return_value: untyped
|
194
|
-
def called_str: () -> String
|
195
|
-
end
|
196
|
-
class Failure < Data
|
197
|
-
include ReturnValueWithType
|
198
|
-
def self.new: (symbolic_call: symbolic_call, return_value: untyped, ?exception: ::Exception?) -> instance
|
199
|
-
attr_reader symbolic_call: symbolic_call
|
200
|
-
attr_reader return_value: untyped
|
201
|
-
attr_reader exception: ::Exception?
|
202
|
-
def called_str: () -> String
|
203
|
-
end
|
204
|
-
class Skip < Data
|
205
|
-
def self.new: (symbolic_call: symbolic_call?, exception: ::Exception) -> instance
|
206
|
-
attr_reader symbolic_call: symbolic_call?
|
207
|
-
attr_reader exception: ::Exception
|
208
|
-
end
|
209
|
-
class Exception < Data
|
210
|
-
def self.new: (symbolic_call: symbolic_call?, exception: ::Exception) -> instance
|
211
|
-
attr_reader symbolic_call: symbolic_call?
|
212
|
-
attr_reader exception: ::Exception
|
213
|
-
end
|
214
|
-
end
|
215
|
-
|
216
|
-
class Sized[T]
|
217
|
-
@block: ::Proc
|
218
|
-
@such_that: ::Proc?
|
219
|
-
|
220
|
-
def initialize: () { (Integer) -> untyped } -> void
|
221
|
-
def pick: (size: Integer) -> T
|
222
|
-
def such_that: () { (untyped) -> boolish } -> self
|
223
|
-
def such_that_loop: [R] () { (Integer) -> R } -> R
|
224
|
-
end
|
225
|
-
|
226
|
-
class SymbolicCaller
|
227
|
-
class Var
|
228
|
-
attr_reader name: String
|
229
|
-
def initialize: (String name) -> void
|
230
|
-
def +: (String) -> String
|
231
|
-
def to_s: () -> String
|
232
|
-
end
|
233
|
-
|
234
|
-
attr_reader symbolic_call: untyped
|
235
|
-
attr_reader allow_private: bool
|
236
|
-
|
237
|
-
def initialize: (untyped, ?allow_private: bool) -> void
|
238
|
-
def eval: () -> untyped
|
239
|
-
def call_str: () -> String
|
240
|
-
def to_lines: () -> Array[String]
|
241
|
-
|
242
|
-
private
|
243
|
-
|
244
|
-
def try_eval: (untyped) -> untyped
|
245
|
-
def walk: () ?{ (symbolic_call) -> untyped} -> untyped
|
246
|
-
def _walk: (untyped, bool is_last) ?{ (symbolic_call) -> untyped} -> untyped
|
247
|
-
def eval_one: (symbolic_call) -> untyped
|
248
|
-
def var_name: (Module) -> String
|
249
|
-
def printable?: (untyped) -> bool
|
250
|
-
def printable: (untyped) -> String
|
251
|
-
end
|
252
|
-
|
253
|
-
class TypeSubstitution
|
254
|
-
@type_params: ::Array[::RBS::AST::TypeParam]
|
255
|
-
@type_args: ::Array[::RBS::Types::t]
|
256
|
-
|
257
|
-
def initialize: (::Array[::RBS::AST::TypeParam], ::Array[::RBS::Types::t]) -> void
|
258
|
-
def build: () -> ::RBS::Substitution
|
259
|
-
def method_type_sub: (::RBS::MethodType, ?self_type: ::RBS::Types::t?, ?instance_type: ::RBS::Types::ClassInstance?, ?class_type: ::RBS::Types::ClassSingleton?) -> ::RBS::MethodType
|
260
|
-
|
261
|
-
private
|
262
|
-
|
263
|
-
interface _MapType
|
264
|
-
def map_type: { (untyped) -> untyped } -> untyped
|
265
|
-
end
|
266
|
-
|
267
|
-
def sub: (_MapType search, self_type: ::RBS::Types::t?, instance_type: ::RBS::Types::t?, class_type: ::RBS::Types::t?) -> untyped
|
268
|
-
end
|
269
|
-
|
270
|
-
class Type
|
271
|
-
module Arithmetic
|
272
|
-
def self.float: () -> Float
|
273
|
-
def self.positive_float: () -> Float
|
274
|
-
end
|
275
|
-
|
276
|
-
@such_that: (^(untyped) -> ::boolish)?
|
277
|
-
|
278
|
-
GENERATORS: Hash[String, ^() -> Sized[untyped]]
|
279
|
-
SIMPLE_SOURCE: Array[String]
|
280
|
-
|
281
|
-
def self.register: (String) { () [self: instance] -> untyped } -> void
|
282
|
-
def self.random: () -> Type
|
283
|
-
def self.random_without_basic_object: () -> Type
|
284
|
-
def self.call_new_from: (Module, ::RBS::Types::ClassInstance, size: Integer) -> symbolic_call
|
285
|
-
|
286
|
-
attr_reader type: ::RBS::Types::t
|
287
|
-
attr_reader range: Range[untyped]
|
288
|
-
|
289
|
-
def initialize: (String | ::RBS::Types::t, ?range: Range[untyped]) -> void
|
290
|
-
|
291
|
-
# Define rule for generating values
|
292
|
-
# type.such_that { |i| i != 0 }.pick #=> ensure that the value is not 0
|
293
|
-
def such_that: () { (untyped) -> boolish } -> self
|
294
|
-
|
295
|
-
# Basic API for materializing values
|
296
|
-
def pick: (?size: Integer) -> untyped
|
297
|
-
def to_symbolic_caller: (?size: Integer) -> SymbolicCaller
|
298
|
-
def to_symbolic_call: (?size: Integer) -> untyped
|
299
|
-
def sized: [T] () { (Integer size) -> T } -> Sized[T]
|
300
|
-
|
301
|
-
private
|
302
|
-
|
303
|
-
def to_symbolic_call_from_initialize: (::RBS::Types::ClassInstance, size: Integer) -> (symbolic_call | Value::Module)
|
304
|
-
def parse: (String | ::RBS::Types::t) -> ::RBS::Types::t?
|
305
|
-
def try: (times: Integer, size: Integer) { (Integer size) -> untyped } -> untyped
|
306
|
-
|
307
|
-
def numeric: () -> Sized[Numeric]
|
308
|
-
def integer: () -> Sized[Integer]
|
309
|
-
def none_zero_integer: () -> Sized[Integer]
|
310
|
-
def float: () -> Sized[Float]
|
311
|
-
def rational: () -> Sized[symbolic_call]
|
312
|
-
def complex: () -> Sized[symbolic_call]
|
313
|
-
def string: () -> Sized[String]
|
314
|
-
def symbol: () -> Sized[Symbol]
|
315
|
-
def array: (Type) -> Sized[Array[untyped]]
|
316
|
-
def dict: (Type, Type) -> Sized[Hash[untyped, untyped]]
|
317
|
-
def encoding: () -> symbolic_call
|
318
|
-
def bool: () -> bool
|
319
|
-
def temp_method_object: () -> ::Method
|
320
|
-
end
|
321
|
-
|
322
|
-
module Value
|
323
|
-
class Bottom < BasicObject
|
324
|
-
def inspect: () -> String
|
325
|
-
def class: () -> class
|
326
|
-
end
|
327
|
-
|
328
|
-
class Interface
|
329
|
-
@type: ::RBS::Types::Interface
|
330
|
-
@size: Integer
|
331
|
-
@definition: ::RBS::Definition
|
332
|
-
|
333
|
-
def self.define_method_from_interface: (::Module base_class, String | ::RBS::Types::Interface type, ?size: Integer) -> void
|
334
|
-
def initialize: (String | ::RBS::Types::Interface | String, ?size: Integer) -> void
|
335
|
-
def respond_to?: (Symbol, ?boolish) -> bool
|
336
|
-
def inspect: () -> String
|
337
|
-
def class: () -> class
|
338
|
-
end
|
339
|
-
|
340
|
-
module Intersection
|
341
|
-
@type: ::RBS::Types::Intersection
|
342
|
-
@children: Array[Type]
|
343
|
-
@size: Integer
|
344
|
-
|
345
|
-
def initialize: (::RBS::Types::Intersection | String, ?size: Integer) -> void
|
346
|
-
def respond_to?: (Symbol, ?boolish) -> bool
|
347
|
-
def inspect: () -> String
|
348
|
-
def class: () -> class
|
349
|
-
end
|
350
|
-
|
351
|
-
class Module < BasicObject
|
352
|
-
@type: ::RBS::Types::ClassInstance
|
353
|
-
@size: Integer
|
354
|
-
@self_type: untyped
|
355
|
-
|
356
|
-
def initialize: (::RBS::Types::ClassInstance | String, ?size: Integer) -> void
|
357
|
-
def respond_to?: (Symbol, ?boolish) -> bool
|
358
|
-
def inspect: () -> String
|
359
|
-
def class: () -> class
|
360
|
-
end
|
361
|
-
|
362
|
-
class Top < BasicObject
|
363
|
-
def inspect: () -> String
|
364
|
-
def class: () -> class
|
365
|
-
end
|
366
|
-
|
367
|
-
class Variable
|
368
|
-
attr_reader type: ::RBS::Types::Variable
|
369
|
-
|
370
|
-
def initialize: (::RBS::Types::Variable | String | Symbol) -> void
|
371
|
-
def inspect: () -> String
|
372
|
-
def class: () -> class
|
373
|
-
end
|
374
|
-
|
375
|
-
class Void < BasicObject
|
376
|
-
def inspect: () -> String
|
377
|
-
def class: () -> class
|
378
|
-
end
|
379
|
-
end
|
380
|
-
end
|
data/sig/shims.rbs
DELETED