mangrove 0.24.0 → 0.30.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 +32 -5
- data/lib/mangrove/result.rb +73 -64
- data/lib/mangrove/version.rb +1 -1
- data/rbi/mangrove.rbi +20 -0
- data/sorbet/rbi/annotations/rainbow.rbi +3 -3
- data/sorbet/rbi/gems/{diff-lcs@1.5.0.rbi → diff-lcs@1.5.1.rbi} +100 -48
- data/sorbet/rbi/gems/{io-console@0.6.0.rbi → io-console@0.7.2.rbi} +1 -0
- data/sorbet/rbi/gems/{json@2.6.3.rbi → json@2.7.2.rbi} +95 -74
- data/sorbet/rbi/gems/{parallel@1.23.0.rbi → parallel@1.24.0.rbi} +9 -1
- data/sorbet/rbi/gems/{parser@3.2.2.4.rbi → parser@3.3.2.0.rbi} +1267 -1282
- data/sorbet/rbi/gems/prism@0.29.0.rbi +37987 -0
- data/sorbet/rbi/gems/{psych@5.1.1.1.rbi → psych@5.1.2.rbi} +231 -267
- data/sorbet/rbi/gems/{racc@1.7.1.rbi → racc@1.8.0.rbi} +37 -36
- data/sorbet/rbi/gems/{rake@13.0.6.rbi → rake@13.2.1.rbi} +217 -73
- data/sorbet/rbi/gems/{rbi@0.1.3.rbi → rbi@0.1.13.rbi} +322 -166
- data/sorbet/rbi/gems/{rdoc@6.6.0.rbi → rdoc@6.7.0.rbi} +735 -685
- data/sorbet/rbi/gems/{regexp_parser@2.8.2.rbi → regexp_parser@2.9.2.rbi} +192 -169
- data/sorbet/rbi/gems/{reline@0.4.0.rbi → reline@0.5.8.rbi} +1 -0
- data/sorbet/rbi/gems/{rexml@3.2.6.rbi → rexml@3.2.8.rbi} +122 -109
- data/sorbet/rbi/gems/{rspec-core@3.12.2.rbi → rspec-core@3.13.0.rbi} +400 -300
- data/sorbet/rbi/gems/{rspec-expectations@3.12.3.rbi → rspec-expectations@3.13.0.rbi} +173 -119
- data/sorbet/rbi/gems/{rspec-mocks@3.12.6.rbi → rspec-mocks@3.13.1.rbi} +195 -160
- data/sorbet/rbi/gems/{rspec-support@3.12.1.rbi → rspec-support@3.13.1.rbi} +319 -298
- data/sorbet/rbi/gems/{rspec@3.12.0.rbi → rspec@3.13.0.rbi} +23 -22
- data/sorbet/rbi/gems/ruboclean@0.6.0.rbi +315 -0
- data/sorbet/rbi/gems/{rubocop-ast@1.29.0.rbi → rubocop-ast@1.31.3.rbi} +348 -285
- data/sorbet/rbi/gems/{rubocop-capybara@2.19.0.rbi → rubocop-capybara@2.20.0.rbi} +148 -65
- data/sorbet/rbi/gems/{rubocop-factory_bot@2.24.0.rbi → rubocop-factory_bot@2.25.1.rbi} +70 -20
- data/sorbet/rbi/gems/{rubocop-rspec@2.24.1.rbi → rubocop-rspec@2.30.0.rbi} +678 -389
- data/sorbet/rbi/gems/rubocop-rspec_rails@2.28.3.rbi +911 -0
- data/sorbet/rbi/gems/{rubocop@1.57.1.rbi → rubocop@1.64.1.rbi} +3225 -1915
- data/sorbet/rbi/gems/{ruby-lsp@0.12.0.rbi → ruby-lsp@0.17.2.rbi} +1 -0
- data/sorbet/rbi/gems/{spoom@1.2.4.rbi → spoom@1.3.2.rbi} +1057 -413
- data/sorbet/rbi/gems/strscan@3.1.0.rbi +9 -0
- data/sorbet/rbi/gems/{tapioca@0.11.10.rbi → tapioca@0.14.3.rbi} +268 -234
- data/sorbet/rbi/gems/{thor@1.3.0.rbi → thor@1.3.1.rbi} +57 -50
- data/sorbet/rbi/gems/{yard@0.9.34.rbi → yard@0.9.36.rbi} +154 -82
- metadata +38 -38
- data/sorbet/rbi/gems/base64@0.1.1.rbi +0 -172
- data/sorbet/rbi/gems/irb@1.9.0.rbi +0 -342
- data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +0 -951
- data/sorbet/rbi/gems/prism@0.15.1.rbi +0 -23922
- data/sorbet/rbi/gems/ruboclean@0.4.0.rbi +0 -189
- data/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +0 -23136
- /data/sorbet/rbi/gems/{stringio@3.0.9.rbi → stringio@3.1.0.rbi} +0 -0
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mangrove
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.30.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kazuma Murata
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sorbet-runtime
|
@@ -46,62 +46,61 @@ files:
|
|
46
46
|
- lib/mangrove/result/control_signal.rb
|
47
47
|
- lib/mangrove/version.rb
|
48
48
|
- lib/tapioca/dsl/compilers/mangrove_enum.rb
|
49
|
+
- rbi/mangrove.rbi
|
49
50
|
- sig/mangrove.rbs
|
50
51
|
- sorbet/config
|
51
52
|
- sorbet/rbi/annotations/.gitattributes
|
52
53
|
- sorbet/rbi/annotations/rainbow.rbi
|
53
54
|
- sorbet/rbi/gems/.gitattributes
|
54
55
|
- sorbet/rbi/gems/ast@2.4.2.rbi
|
55
|
-
- sorbet/rbi/gems/
|
56
|
-
- sorbet/rbi/gems/diff-lcs@1.5.0.rbi
|
56
|
+
- sorbet/rbi/gems/diff-lcs@1.5.1.rbi
|
57
57
|
- sorbet/rbi/gems/docile@1.4.0.rbi
|
58
58
|
- sorbet/rbi/gems/erubi@1.12.0.rbi
|
59
|
-
- sorbet/rbi/gems/io-console@0.
|
60
|
-
- sorbet/rbi/gems/
|
61
|
-
- sorbet/rbi/gems/json@2.6.3.rbi
|
59
|
+
- sorbet/rbi/gems/io-console@0.7.2.rbi
|
60
|
+
- sorbet/rbi/gems/json@2.7.2.rbi
|
62
61
|
- sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi
|
63
62
|
- sorbet/rbi/gems/netrc@0.11.0.rbi
|
64
63
|
- sorbet/rbi/gems/ordinare@0.4.0.rbi
|
65
|
-
- sorbet/rbi/gems/parallel@1.
|
66
|
-
- sorbet/rbi/gems/parser@3.
|
67
|
-
- sorbet/rbi/gems/
|
68
|
-
- sorbet/rbi/gems/
|
69
|
-
- sorbet/rbi/gems/
|
70
|
-
- sorbet/rbi/gems/racc@1.7.1.rbi
|
64
|
+
- sorbet/rbi/gems/parallel@1.24.0.rbi
|
65
|
+
- sorbet/rbi/gems/parser@3.3.2.0.rbi
|
66
|
+
- sorbet/rbi/gems/prism@0.29.0.rbi
|
67
|
+
- sorbet/rbi/gems/psych@5.1.2.rbi
|
68
|
+
- sorbet/rbi/gems/racc@1.8.0.rbi
|
71
69
|
- sorbet/rbi/gems/rainbow@3.1.1.rbi
|
72
|
-
- sorbet/rbi/gems/rake@13.
|
73
|
-
- sorbet/rbi/gems/rbi@0.1.
|
74
|
-
- sorbet/rbi/gems/rdoc@6.
|
75
|
-
- sorbet/rbi/gems/regexp_parser@2.
|
76
|
-
- sorbet/rbi/gems/reline@0.
|
77
|
-
- sorbet/rbi/gems/rexml@3.2.
|
78
|
-
- sorbet/rbi/gems/rspec-core@3.
|
79
|
-
- sorbet/rbi/gems/rspec-expectations@3.
|
80
|
-
- sorbet/rbi/gems/rspec-mocks@3.
|
70
|
+
- sorbet/rbi/gems/rake@13.2.1.rbi
|
71
|
+
- sorbet/rbi/gems/rbi@0.1.13.rbi
|
72
|
+
- sorbet/rbi/gems/rdoc@6.7.0.rbi
|
73
|
+
- sorbet/rbi/gems/regexp_parser@2.9.2.rbi
|
74
|
+
- sorbet/rbi/gems/reline@0.5.8.rbi
|
75
|
+
- sorbet/rbi/gems/rexml@3.2.8.rbi
|
76
|
+
- sorbet/rbi/gems/rspec-core@3.13.0.rbi
|
77
|
+
- sorbet/rbi/gems/rspec-expectations@3.13.0.rbi
|
78
|
+
- sorbet/rbi/gems/rspec-mocks@3.13.1.rbi
|
81
79
|
- sorbet/rbi/gems/rspec-sorbet@1.9.2.rbi
|
82
|
-
- sorbet/rbi/gems/rspec-support@3.
|
83
|
-
- sorbet/rbi/gems/rspec@3.
|
84
|
-
- sorbet/rbi/gems/ruboclean@0.
|
85
|
-
- sorbet/rbi/gems/rubocop-ast@1.
|
86
|
-
- sorbet/rbi/gems/rubocop-capybara@2.
|
87
|
-
- sorbet/rbi/gems/rubocop-factory_bot@2.
|
80
|
+
- sorbet/rbi/gems/rspec-support@3.13.1.rbi
|
81
|
+
- sorbet/rbi/gems/rspec@3.13.0.rbi
|
82
|
+
- sorbet/rbi/gems/ruboclean@0.6.0.rbi
|
83
|
+
- sorbet/rbi/gems/rubocop-ast@1.31.3.rbi
|
84
|
+
- sorbet/rbi/gems/rubocop-capybara@2.20.0.rbi
|
85
|
+
- sorbet/rbi/gems/rubocop-factory_bot@2.25.1.rbi
|
88
86
|
- sorbet/rbi/gems/rubocop-rake@0.6.0.rbi
|
89
|
-
- sorbet/rbi/gems/rubocop-rspec@2.
|
90
|
-
- sorbet/rbi/gems/rubocop@
|
91
|
-
- sorbet/rbi/gems/
|
87
|
+
- sorbet/rbi/gems/rubocop-rspec@2.30.0.rbi
|
88
|
+
- sorbet/rbi/gems/rubocop-rspec_rails@2.28.3.rbi
|
89
|
+
- sorbet/rbi/gems/rubocop@1.64.1.rbi
|
90
|
+
- sorbet/rbi/gems/ruby-lsp@0.17.2.rbi
|
92
91
|
- sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi
|
93
92
|
- sorbet/rbi/gems/simplecov-html@0.12.3.rbi
|
94
93
|
- sorbet/rbi/gems/simplecov@0.22.0.rbi
|
95
94
|
- sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi
|
96
|
-
- sorbet/rbi/gems/spoom@1.2.
|
97
|
-
- sorbet/rbi/gems/stringio@3.0.
|
98
|
-
- sorbet/rbi/gems/
|
99
|
-
- sorbet/rbi/gems/tapioca@0.
|
100
|
-
- sorbet/rbi/gems/thor@1.3.
|
95
|
+
- sorbet/rbi/gems/spoom@1.3.2.rbi
|
96
|
+
- sorbet/rbi/gems/stringio@3.1.0.rbi
|
97
|
+
- sorbet/rbi/gems/strscan@3.1.0.rbi
|
98
|
+
- sorbet/rbi/gems/tapioca@0.14.3.rbi
|
99
|
+
- sorbet/rbi/gems/thor@1.3.1.rbi
|
101
100
|
- sorbet/rbi/gems/unicode-display_width@2.5.0.rbi
|
102
101
|
- sorbet/rbi/gems/webrick@1.8.1.rbi
|
103
102
|
- sorbet/rbi/gems/yard-sorbet@0.8.1.rbi
|
104
|
-
- sorbet/rbi/gems/yard@0.9.
|
103
|
+
- sorbet/rbi/gems/yard@0.9.36.rbi
|
105
104
|
- sorbet/rbi/shims/gems/rspec-core.rbi
|
106
105
|
- sorbet/rbi/shims/gems/rspec-expectations.rbi
|
107
106
|
- sorbet/tapioca/config.yml
|
@@ -118,6 +117,7 @@ post_install_message:
|
|
118
117
|
rdoc_options: []
|
119
118
|
require_paths:
|
120
119
|
- lib
|
120
|
+
- rbi
|
121
121
|
required_ruby_version: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
123
|
- - ">="
|
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
129
|
- !ruby/object:Gem::Version
|
130
130
|
version: '0'
|
131
131
|
requirements: []
|
132
|
-
rubygems_version: 3.5.
|
132
|
+
rubygems_version: 3.5.9
|
133
133
|
signing_key:
|
134
134
|
specification_version: 4
|
135
135
|
summary: Type Utility for Ruby.
|
@@ -1,172 +0,0 @@
|
|
1
|
-
# typed: true
|
2
|
-
|
3
|
-
# DO NOT EDIT MANUALLY
|
4
|
-
# This is an autogenerated file for types exported from the `base64` gem.
|
5
|
-
# Please instead update this file by running `bin/tapioca gem base64`.
|
6
|
-
|
7
|
-
# The Base64 module provides for the encoding (#encode64, #strict_encode64,
|
8
|
-
# #urlsafe_encode64) and decoding (#decode64, #strict_decode64,
|
9
|
-
# #urlsafe_decode64) of binary data using a Base64 representation.
|
10
|
-
#
|
11
|
-
# == Example
|
12
|
-
#
|
13
|
-
# A simple encoding and decoding.
|
14
|
-
#
|
15
|
-
# require "base64"
|
16
|
-
#
|
17
|
-
# enc = Base64.encode64('Send reinforcements')
|
18
|
-
# # -> "U2VuZCByZWluZm9yY2VtZW50cw==\n"
|
19
|
-
# plain = Base64.decode64(enc)
|
20
|
-
# # -> "Send reinforcements"
|
21
|
-
#
|
22
|
-
# The purpose of using base64 to encode data is that it translates any
|
23
|
-
# binary data into purely printable characters.
|
24
|
-
module Base64
|
25
|
-
private
|
26
|
-
|
27
|
-
# Returns the Base64-decoded version of +str+.
|
28
|
-
# This method complies with RFC 2045.
|
29
|
-
# Characters outside the base alphabet are ignored.
|
30
|
-
#
|
31
|
-
# require 'base64'
|
32
|
-
# str = 'VGhpcyBpcyBsaW5lIG9uZQpUaGlzIG' +
|
33
|
-
# 'lzIGxpbmUgdHdvClRoaXMgaXMgbGlu' +
|
34
|
-
# 'ZSB0aHJlZQpBbmQgc28gb24uLi4K'
|
35
|
-
# puts Base64.decode64(str)
|
36
|
-
#
|
37
|
-
# <i>Generates:</i>
|
38
|
-
#
|
39
|
-
# This is line one
|
40
|
-
# This is line two
|
41
|
-
# This is line three
|
42
|
-
# And so on...
|
43
|
-
#
|
44
|
-
# source://base64//base64.rb#58
|
45
|
-
def decode64(str); end
|
46
|
-
|
47
|
-
# Returns the Base64-encoded version of +bin+.
|
48
|
-
# This method complies with RFC 2045.
|
49
|
-
# Line feeds are added to every 60 encoded characters.
|
50
|
-
#
|
51
|
-
# require 'base64'
|
52
|
-
# Base64.encode64("Now is the time for all good coders\nto learn Ruby")
|
53
|
-
#
|
54
|
-
# <i>Generates:</i>
|
55
|
-
#
|
56
|
-
# Tm93IGlzIHRoZSB0aW1lIGZvciBhbGwgZ29vZCBjb2RlcnMKdG8gbGVhcm4g
|
57
|
-
# UnVieQ==
|
58
|
-
#
|
59
|
-
# source://base64//base64.rb#38
|
60
|
-
def encode64(bin); end
|
61
|
-
|
62
|
-
# Returns the Base64-decoded version of +str+.
|
63
|
-
# This method complies with RFC 4648.
|
64
|
-
# ArgumentError is raised if +str+ is incorrectly padded or contains
|
65
|
-
# non-alphabet characters. Note that CR or LF are also rejected.
|
66
|
-
#
|
67
|
-
# source://base64//base64.rb#73
|
68
|
-
def strict_decode64(str); end
|
69
|
-
|
70
|
-
# Returns the Base64-encoded version of +bin+.
|
71
|
-
# This method complies with RFC 4648.
|
72
|
-
# No line feeds are added.
|
73
|
-
#
|
74
|
-
# source://base64//base64.rb#65
|
75
|
-
def strict_encode64(bin); end
|
76
|
-
|
77
|
-
# Returns the Base64-decoded version of +str+.
|
78
|
-
# This method complies with ``Base 64 Encoding with URL and Filename Safe
|
79
|
-
# Alphabet'' in RFC 4648.
|
80
|
-
# The alphabet uses '-' instead of '+' and '_' instead of '/'.
|
81
|
-
#
|
82
|
-
# The padding character is optional.
|
83
|
-
# This method accepts both correctly-padded and unpadded input.
|
84
|
-
# Note that it still rejects incorrectly-padded input.
|
85
|
-
#
|
86
|
-
# source://base64//base64.rb#98
|
87
|
-
def urlsafe_decode64(str); end
|
88
|
-
|
89
|
-
# Returns the Base64-encoded version of +bin+.
|
90
|
-
# This method complies with ``Base 64 Encoding with URL and Filename Safe
|
91
|
-
# Alphabet'' in RFC 4648.
|
92
|
-
# The alphabet uses '-' instead of '+' and '_' instead of '/'.
|
93
|
-
# Note that the result can still contain '='.
|
94
|
-
# You can remove the padding by setting +padding+ as false.
|
95
|
-
#
|
96
|
-
# source://base64//base64.rb#83
|
97
|
-
def urlsafe_encode64(bin, padding: T.unsafe(nil)); end
|
98
|
-
|
99
|
-
class << self
|
100
|
-
# Returns the Base64-decoded version of +str+.
|
101
|
-
# This method complies with RFC 2045.
|
102
|
-
# Characters outside the base alphabet are ignored.
|
103
|
-
#
|
104
|
-
# require 'base64'
|
105
|
-
# str = 'VGhpcyBpcyBsaW5lIG9uZQpUaGlzIG' +
|
106
|
-
# 'lzIGxpbmUgdHdvClRoaXMgaXMgbGlu' +
|
107
|
-
# 'ZSB0aHJlZQpBbmQgc28gb24uLi4K'
|
108
|
-
# puts Base64.decode64(str)
|
109
|
-
#
|
110
|
-
# <i>Generates:</i>
|
111
|
-
#
|
112
|
-
# This is line one
|
113
|
-
# This is line two
|
114
|
-
# This is line three
|
115
|
-
# And so on...
|
116
|
-
#
|
117
|
-
# source://base64//base64.rb#58
|
118
|
-
def decode64(str); end
|
119
|
-
|
120
|
-
# Returns the Base64-encoded version of +bin+.
|
121
|
-
# This method complies with RFC 2045.
|
122
|
-
# Line feeds are added to every 60 encoded characters.
|
123
|
-
#
|
124
|
-
# require 'base64'
|
125
|
-
# Base64.encode64("Now is the time for all good coders\nto learn Ruby")
|
126
|
-
#
|
127
|
-
# <i>Generates:</i>
|
128
|
-
#
|
129
|
-
# Tm93IGlzIHRoZSB0aW1lIGZvciBhbGwgZ29vZCBjb2RlcnMKdG8gbGVhcm4g
|
130
|
-
# UnVieQ==
|
131
|
-
#
|
132
|
-
# source://base64//base64.rb#38
|
133
|
-
def encode64(bin); end
|
134
|
-
|
135
|
-
# Returns the Base64-decoded version of +str+.
|
136
|
-
# This method complies with RFC 4648.
|
137
|
-
# ArgumentError is raised if +str+ is incorrectly padded or contains
|
138
|
-
# non-alphabet characters. Note that CR or LF are also rejected.
|
139
|
-
#
|
140
|
-
# source://base64//base64.rb#73
|
141
|
-
def strict_decode64(str); end
|
142
|
-
|
143
|
-
# Returns the Base64-encoded version of +bin+.
|
144
|
-
# This method complies with RFC 4648.
|
145
|
-
# No line feeds are added.
|
146
|
-
#
|
147
|
-
# source://base64//base64.rb#65
|
148
|
-
def strict_encode64(bin); end
|
149
|
-
|
150
|
-
# Returns the Base64-decoded version of +str+.
|
151
|
-
# This method complies with ``Base 64 Encoding with URL and Filename Safe
|
152
|
-
# Alphabet'' in RFC 4648.
|
153
|
-
# The alphabet uses '-' instead of '+' and '_' instead of '/'.
|
154
|
-
#
|
155
|
-
# The padding character is optional.
|
156
|
-
# This method accepts both correctly-padded and unpadded input.
|
157
|
-
# Note that it still rejects incorrectly-padded input.
|
158
|
-
#
|
159
|
-
# source://base64//base64.rb#98
|
160
|
-
def urlsafe_decode64(str); end
|
161
|
-
|
162
|
-
# Returns the Base64-encoded version of +bin+.
|
163
|
-
# This method complies with ``Base 64 Encoding with URL and Filename Safe
|
164
|
-
# Alphabet'' in RFC 4648.
|
165
|
-
# The alphabet uses '-' instead of '+' and '_' instead of '/'.
|
166
|
-
# Note that the result can still contain '='.
|
167
|
-
# You can remove the padding by setting +padding+ as false.
|
168
|
-
#
|
169
|
-
# source://base64//base64.rb#83
|
170
|
-
def urlsafe_encode64(bin, padding: T.unsafe(nil)); end
|
171
|
-
end
|
172
|
-
end
|
@@ -1,342 +0,0 @@
|
|
1
|
-
# typed: true
|
2
|
-
|
3
|
-
# DO NOT EDIT MANUALLY
|
4
|
-
# This is an autogenerated file for types exported from the `irb` gem.
|
5
|
-
# Please instead update this file by running `bin/tapioca gem irb`.
|
6
|
-
|
7
|
-
# An output formatter used internally by the lexer.
|
8
|
-
#
|
9
|
-
# source://irb//lib/irb/notifier.rb#11
|
10
|
-
module IRB::Notifier
|
11
|
-
private
|
12
|
-
|
13
|
-
# Define a new Notifier output source, returning a new CompositeNotifier
|
14
|
-
# with the given +prefix+ and +output_method+.
|
15
|
-
#
|
16
|
-
# The optional +prefix+ will be appended to all objects being inspected
|
17
|
-
# during output, using the given +output_method+ as the output source. If
|
18
|
-
# no +output_method+ is given, StdioOutputMethod will be used, and all
|
19
|
-
# expressions will be sent directly to STDOUT without any additional
|
20
|
-
# formatting.
|
21
|
-
#
|
22
|
-
# source://irb//lib/irb/notifier.rb#31
|
23
|
-
def def_notifier(prefix = T.unsafe(nil), output_method = T.unsafe(nil)); end
|
24
|
-
|
25
|
-
class << self
|
26
|
-
# Define a new Notifier output source, returning a new CompositeNotifier
|
27
|
-
# with the given +prefix+ and +output_method+.
|
28
|
-
#
|
29
|
-
# The optional +prefix+ will be appended to all objects being inspected
|
30
|
-
# during output, using the given +output_method+ as the output source. If
|
31
|
-
# no +output_method+ is given, StdioOutputMethod will be used, and all
|
32
|
-
# expressions will be sent directly to STDOUT without any additional
|
33
|
-
# formatting.
|
34
|
-
#
|
35
|
-
# source://irb//lib/irb/notifier.rb#31
|
36
|
-
def def_notifier(prefix = T.unsafe(nil), output_method = T.unsafe(nil)); end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
# An abstract class, or superclass, for CompositeNotifier and
|
41
|
-
# LeveledNotifier to inherit. It provides several wrapper methods for the
|
42
|
-
# OutputMethod object used by the Notifier.
|
43
|
-
#
|
44
|
-
# source://irb//lib/irb/notifier.rb#39
|
45
|
-
class IRB::Notifier::AbstractNotifier
|
46
|
-
# Creates a new Notifier object
|
47
|
-
#
|
48
|
-
# @return [AbstractNotifier] a new instance of AbstractNotifier
|
49
|
-
#
|
50
|
-
# source://irb//lib/irb/notifier.rb#41
|
51
|
-
def initialize(prefix, base_notifier); end
|
52
|
-
|
53
|
-
# Execute the given block if notifications are enabled.
|
54
|
-
#
|
55
|
-
# @yield [@base_notifier]
|
56
|
-
#
|
57
|
-
# source://irb//lib/irb/notifier.rb#99
|
58
|
-
def exec_if; end
|
59
|
-
|
60
|
-
# A wrapper method used to determine whether notifications are enabled.
|
61
|
-
#
|
62
|
-
# Defaults to +true+.
|
63
|
-
#
|
64
|
-
# @return [Boolean]
|
65
|
-
#
|
66
|
-
# source://irb//lib/irb/notifier.rb#53
|
67
|
-
def notify?; end
|
68
|
-
|
69
|
-
# Same as #ppx, except it uses the #prefix given during object
|
70
|
-
# initialization.
|
71
|
-
# See OutputMethod#ppx for more detail.
|
72
|
-
#
|
73
|
-
# source://irb//lib/irb/notifier.rb#82
|
74
|
-
def pp(*objs); end
|
75
|
-
|
76
|
-
# Same as #pp, except it concatenates the given +prefix+ with the #prefix
|
77
|
-
# given during object initialization.
|
78
|
-
#
|
79
|
-
# See OutputMethod#ppx for more detail.
|
80
|
-
#
|
81
|
-
# source://irb//lib/irb/notifier.rb#92
|
82
|
-
def ppx(prefix, *objs); end
|
83
|
-
|
84
|
-
# The +prefix+ for this Notifier, which is appended to all objects being
|
85
|
-
# inspected during output.
|
86
|
-
#
|
87
|
-
# source://irb//lib/irb/notifier.rb#48
|
88
|
-
def prefix; end
|
89
|
-
|
90
|
-
# See OutputMethod#print for more detail.
|
91
|
-
#
|
92
|
-
# source://irb//lib/irb/notifier.rb#58
|
93
|
-
def print(*opts); end
|
94
|
-
|
95
|
-
# See OutputMethod#printf for more detail.
|
96
|
-
#
|
97
|
-
# source://irb//lib/irb/notifier.rb#68
|
98
|
-
def printf(format, *opts); end
|
99
|
-
|
100
|
-
# See OutputMethod#printn for more detail.
|
101
|
-
#
|
102
|
-
# source://irb//lib/irb/notifier.rb#63
|
103
|
-
def printn(*opts); end
|
104
|
-
|
105
|
-
# See OutputMethod#puts for more detail.
|
106
|
-
#
|
107
|
-
# source://irb//lib/irb/notifier.rb#73
|
108
|
-
def puts(*objs); end
|
109
|
-
end
|
110
|
-
|
111
|
-
# A class that can be used to create a group of notifier objects with the
|
112
|
-
# intent of representing a leveled notification system for irb.
|
113
|
-
#
|
114
|
-
# This class will allow you to generate other notifiers, and assign them
|
115
|
-
# the appropriate level for output.
|
116
|
-
#
|
117
|
-
# The Notifier class provides a class-method Notifier.def_notifier to
|
118
|
-
# create a new composite notifier. Using the first composite notifier
|
119
|
-
# object you create, sibling notifiers can be initialized with
|
120
|
-
# #def_notifier.
|
121
|
-
#
|
122
|
-
# source://irb//lib/irb/notifier.rb#116
|
123
|
-
class IRB::Notifier::CompositeNotifier < ::IRB::Notifier::AbstractNotifier
|
124
|
-
# Create a new composite notifier object with the given +prefix+, and
|
125
|
-
# +base_notifier+ to use for output.
|
126
|
-
#
|
127
|
-
# @return [CompositeNotifier] a new instance of CompositeNotifier
|
128
|
-
#
|
129
|
-
# source://irb//lib/irb/notifier.rb#117
|
130
|
-
def initialize(prefix, base_notifier); end
|
131
|
-
|
132
|
-
# Creates a new LeveledNotifier in the composite #notifiers group.
|
133
|
-
#
|
134
|
-
# The given +prefix+ will be assigned to the notifier, and +level+ will
|
135
|
-
# be used as the index of the #notifiers Array.
|
136
|
-
#
|
137
|
-
# This method returns the newly created instance.
|
138
|
-
#
|
139
|
-
# source://irb//lib/irb/notifier.rb#133
|
140
|
-
def def_notifier(level, prefix = T.unsafe(nil)); end
|
141
|
-
|
142
|
-
# Returns the leveled notifier for this object
|
143
|
-
#
|
144
|
-
# source://irb//lib/irb/notifier.rb#140
|
145
|
-
def level; end
|
146
|
-
|
147
|
-
# Sets the leveled notifier for this object.
|
148
|
-
#
|
149
|
-
# When the given +value+ is an instance of AbstractNotifier,
|
150
|
-
# #level_notifier is set to the given object.
|
151
|
-
#
|
152
|
-
# When an Integer is given, #level_notifier is set to the notifier at the
|
153
|
-
# index +value+ in the #notifiers Array.
|
154
|
-
#
|
155
|
-
# If no notifier exists at the index +value+ in the #notifiers Array, an
|
156
|
-
# ErrUndefinedNotifier exception is raised.
|
157
|
-
#
|
158
|
-
# An ErrUnrecognizedLevel exception is raised if the given +value+ is not
|
159
|
-
# found in the existing #notifiers Array, or an instance of
|
160
|
-
# AbstractNotifier
|
161
|
-
#
|
162
|
-
# source://irb//lib/irb/notifier.rb#157
|
163
|
-
def level=(value); end
|
164
|
-
|
165
|
-
# Returns the leveled notifier for this object
|
166
|
-
#
|
167
|
-
# source://irb//lib/irb/notifier.rb#140
|
168
|
-
def level_notifier; end
|
169
|
-
|
170
|
-
# Sets the leveled notifier for this object.
|
171
|
-
#
|
172
|
-
# When the given +value+ is an instance of AbstractNotifier,
|
173
|
-
# #level_notifier is set to the given object.
|
174
|
-
#
|
175
|
-
# When an Integer is given, #level_notifier is set to the notifier at the
|
176
|
-
# index +value+ in the #notifiers Array.
|
177
|
-
#
|
178
|
-
# If no notifier exists at the index +value+ in the #notifiers Array, an
|
179
|
-
# ErrUndefinedNotifier exception is raised.
|
180
|
-
#
|
181
|
-
# An ErrUnrecognizedLevel exception is raised if the given +value+ is not
|
182
|
-
# found in the existing #notifiers Array, or an instance of
|
183
|
-
# AbstractNotifier
|
184
|
-
#
|
185
|
-
# source://irb//lib/irb/notifier.rb#157
|
186
|
-
def level_notifier=(value); end
|
187
|
-
|
188
|
-
# List of notifiers in the group
|
189
|
-
#
|
190
|
-
# source://irb//lib/irb/notifier.rb#125
|
191
|
-
def notifiers; end
|
192
|
-
end
|
193
|
-
|
194
|
-
# source://irb//lib/irb/notifier.rb#12
|
195
|
-
class IRB::Notifier::ErrUndefinedNotifier < ::StandardError
|
196
|
-
# @return [ErrUndefinedNotifier] a new instance of ErrUndefinedNotifier
|
197
|
-
#
|
198
|
-
# source://irb//lib/irb/notifier.rb#13
|
199
|
-
def initialize(val); end
|
200
|
-
end
|
201
|
-
|
202
|
-
# source://irb//lib/irb/notifier.rb#17
|
203
|
-
class IRB::Notifier::ErrUnrecognizedLevel < ::StandardError
|
204
|
-
# @return [ErrUnrecognizedLevel] a new instance of ErrUnrecognizedLevel
|
205
|
-
#
|
206
|
-
# source://irb//lib/irb/notifier.rb#18
|
207
|
-
def initialize(val); end
|
208
|
-
end
|
209
|
-
|
210
|
-
# A leveled notifier is comparable to the composite group from
|
211
|
-
# CompositeNotifier#notifiers.
|
212
|
-
#
|
213
|
-
# source://irb//lib/irb/notifier.rb#175
|
214
|
-
class IRB::Notifier::LeveledNotifier < ::IRB::Notifier::AbstractNotifier
|
215
|
-
include ::Comparable
|
216
|
-
|
217
|
-
# Create a new leveled notifier with the given +base+, and +prefix+ to
|
218
|
-
# send to AbstractNotifier.new
|
219
|
-
#
|
220
|
-
# The given +level+ is used to compare other leveled notifiers in the
|
221
|
-
# CompositeNotifier group to determine whether or not to output
|
222
|
-
# notifications.
|
223
|
-
#
|
224
|
-
# @return [LeveledNotifier] a new instance of LeveledNotifier
|
225
|
-
#
|
226
|
-
# source://irb//lib/irb/notifier.rb#184
|
227
|
-
def initialize(base, level, prefix); end
|
228
|
-
|
229
|
-
# Compares the level of this notifier object with the given +other+
|
230
|
-
# notifier.
|
231
|
-
#
|
232
|
-
# See the Comparable module for more information.
|
233
|
-
#
|
234
|
-
# source://irb//lib/irb/notifier.rb#197
|
235
|
-
def <=>(other); end
|
236
|
-
|
237
|
-
# The current level of this notifier object
|
238
|
-
#
|
239
|
-
# source://irb//lib/irb/notifier.rb#191
|
240
|
-
def level; end
|
241
|
-
|
242
|
-
# Whether to output messages to the output method, depending on the level
|
243
|
-
# of this notifier object.
|
244
|
-
#
|
245
|
-
# @return [Boolean]
|
246
|
-
#
|
247
|
-
# source://irb//lib/irb/notifier.rb#203
|
248
|
-
def notify?; end
|
249
|
-
end
|
250
|
-
|
251
|
-
# NoMsgNotifier is a LeveledNotifier that's used as the default notifier
|
252
|
-
# when creating a new CompositeNotifier.
|
253
|
-
#
|
254
|
-
# This notifier is used as the +zero+ index, or level +0+, for
|
255
|
-
# CompositeNotifier#notifiers, and will not output messages of any sort.
|
256
|
-
#
|
257
|
-
# source://irb//lib/irb/notifier.rb#214
|
258
|
-
class IRB::Notifier::NoMsgNotifier < ::IRB::Notifier::LeveledNotifier
|
259
|
-
# Creates a new notifier that should not be used to output messages.
|
260
|
-
#
|
261
|
-
# @return [NoMsgNotifier] a new instance of NoMsgNotifier
|
262
|
-
#
|
263
|
-
# source://irb//lib/irb/notifier.rb#215
|
264
|
-
def initialize; end
|
265
|
-
|
266
|
-
# Ensures notifications are ignored, see AbstractNotifier#notify? for
|
267
|
-
# more information.
|
268
|
-
#
|
269
|
-
# @return [Boolean]
|
270
|
-
#
|
271
|
-
# source://irb//lib/irb/notifier.rb#223
|
272
|
-
def notify?; end
|
273
|
-
end
|
274
|
-
|
275
|
-
# An abstract output class for IO in irb. This is mainly used internally by
|
276
|
-
# IRB::Notifier. You can define your own output method to use with Irb.new,
|
277
|
-
# or Context.new
|
278
|
-
#
|
279
|
-
# source://irb//lib/irb/output-method.rb#11
|
280
|
-
class IRB::OutputMethod
|
281
|
-
# Returns an array of the given +format+ and +opts+ to be used by
|
282
|
-
# Kernel#sprintf, if there was a successful Regexp match in the given
|
283
|
-
# +format+ from #printf
|
284
|
-
#
|
285
|
-
# %
|
286
|
-
# <flag> [#0- +]
|
287
|
-
# <minimum field width> (\*|\*[1-9][0-9]*\$|[1-9][0-9]*)
|
288
|
-
# <precision>.(\*|\*[1-9][0-9]*\$|[1-9][0-9]*|)?
|
289
|
-
# #<length modifier>(hh|h|l|ll|L|q|j|z|t)
|
290
|
-
# <conversion specifier>[diouxXeEfgGcsb%]
|
291
|
-
#
|
292
|
-
# source://irb//lib/irb/output-method.rb#48
|
293
|
-
def parse_printf_format(format, opts); end
|
294
|
-
|
295
|
-
# Prints the given +objs+ calling Object#inspect on each.
|
296
|
-
#
|
297
|
-
# See #puts for more detail.
|
298
|
-
#
|
299
|
-
# source://irb//lib/irb/output-method.rb#64
|
300
|
-
def pp(*objs); end
|
301
|
-
|
302
|
-
# Prints the given +objs+ calling Object#inspect on each and appending the
|
303
|
-
# given +prefix+.
|
304
|
-
#
|
305
|
-
# See #puts for more detail.
|
306
|
-
#
|
307
|
-
# source://irb//lib/irb/output-method.rb#72
|
308
|
-
def ppx(prefix, *objs); end
|
309
|
-
|
310
|
-
# Open this method to implement your own output method, raises a
|
311
|
-
# NotImplementedError if you don't define #print in your own class.
|
312
|
-
#
|
313
|
-
# @raise [NotImplementedError]
|
314
|
-
#
|
315
|
-
# source://irb//lib/irb/output-method.rb#20
|
316
|
-
def print(*opts); end
|
317
|
-
|
318
|
-
# Extends IO#printf to format the given +opts+ for Kernel#sprintf using
|
319
|
-
# #parse_printf_format
|
320
|
-
#
|
321
|
-
# source://irb//lib/irb/output-method.rb#31
|
322
|
-
def printf(format, *opts); end
|
323
|
-
|
324
|
-
# Prints the given +opts+, with a newline delimiter.
|
325
|
-
#
|
326
|
-
# source://irb//lib/irb/output-method.rb#25
|
327
|
-
def printn(*opts); end
|
328
|
-
|
329
|
-
# Calls #print on each element in the given +objs+, followed by a newline
|
330
|
-
# character.
|
331
|
-
#
|
332
|
-
# source://irb//lib/irb/output-method.rb#54
|
333
|
-
def puts(*objs); end
|
334
|
-
end
|
335
|
-
|
336
|
-
# source://irb//lib/irb/output-method.rb#12
|
337
|
-
class IRB::OutputMethod::NotImplementedError < ::StandardError
|
338
|
-
# @return [NotImplementedError] a new instance of NotImplementedError
|
339
|
-
#
|
340
|
-
# source://irb//lib/irb/output-method.rb#13
|
341
|
-
def initialize(val); end
|
342
|
-
end
|