rails-on-sorbet 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rails/on/sorbet/version.rb +1 -1
- data/rbi/action_controller.rbi +10 -0
- data/rbi/current_attributes.rbi +17 -0
- data/rbi/datetime.rbi +11 -0
- data/rbi/duration.rbi +327 -0
- data/rbi/map.rbi +933 -0
- data/rbi/numeric.rbi +254 -0
- metadata +7 -1
data/rbi/numeric.rbi
ADDED
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
|
|
3
|
+
class Numeric
|
|
4
|
+
# No number is blank:
|
|
5
|
+
#
|
|
6
|
+
# 1.blank? # => false
|
|
7
|
+
# 0.blank? # => false
|
|
8
|
+
#
|
|
9
|
+
# @return [false]
|
|
10
|
+
#
|
|
11
|
+
# source://activesupport//lib/active_support/core_ext/object/blank.rb#141
|
|
12
|
+
#: -> FalseClass
|
|
13
|
+
def blank?; end
|
|
14
|
+
|
|
15
|
+
# Enables the use of byte calculations and declarations, like 45.bytes + 2.6.megabytes
|
|
16
|
+
#
|
|
17
|
+
# 2.bytes # => 2
|
|
18
|
+
#
|
|
19
|
+
# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#15
|
|
20
|
+
#: -> self
|
|
21
|
+
def byte; end
|
|
22
|
+
|
|
23
|
+
# Enables the use of byte calculations and declarations, like 45.bytes + 2.6.megabytes
|
|
24
|
+
#
|
|
25
|
+
# 2.bytes # => 2
|
|
26
|
+
#
|
|
27
|
+
# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#15
|
|
28
|
+
#: -> self
|
|
29
|
+
def bytes; end
|
|
30
|
+
|
|
31
|
+
# Returns a Duration instance matching the number of days provided.
|
|
32
|
+
#
|
|
33
|
+
# 2.days # => 2 days
|
|
34
|
+
#
|
|
35
|
+
# source://activesupport//lib/active_support/core_ext/numeric/time.rb#37
|
|
36
|
+
#: -> ActiveSupport::Duration
|
|
37
|
+
def day; end
|
|
38
|
+
|
|
39
|
+
# Returns a Duration instance matching the number of days provided.
|
|
40
|
+
#
|
|
41
|
+
# 2.days # => 2 days
|
|
42
|
+
#
|
|
43
|
+
# source://activesupport//lib/active_support/core_ext/numeric/time.rb#37
|
|
44
|
+
#: -> ActiveSupport::Duration
|
|
45
|
+
def days; end
|
|
46
|
+
|
|
47
|
+
# Returns the number of bytes equivalent to the exabytes provided.
|
|
48
|
+
#
|
|
49
|
+
# 2.exabytes # => 2_305_843_009_213_693_952
|
|
50
|
+
#
|
|
51
|
+
# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#63
|
|
52
|
+
#: -> self
|
|
53
|
+
def exabyte; end
|
|
54
|
+
|
|
55
|
+
# Returns the number of bytes equivalent to the exabytes provided.
|
|
56
|
+
#
|
|
57
|
+
# 2.exabytes # => 2_305_843_009_213_693_952
|
|
58
|
+
#
|
|
59
|
+
# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#63
|
|
60
|
+
#: -> self
|
|
61
|
+
def exabytes; end
|
|
62
|
+
|
|
63
|
+
# Returns a Duration instance matching the number of fortnights provided.
|
|
64
|
+
#
|
|
65
|
+
# 2.fortnights # => 4 weeks
|
|
66
|
+
#
|
|
67
|
+
# source://activesupport//lib/active_support/core_ext/numeric/time.rb#53
|
|
68
|
+
#: -> ActiveSupport::Duration
|
|
69
|
+
def fortnight; end
|
|
70
|
+
|
|
71
|
+
# Returns a Duration instance matching the number of fortnights provided.
|
|
72
|
+
#
|
|
73
|
+
# 2.fortnights # => 4 weeks
|
|
74
|
+
#
|
|
75
|
+
# source://activesupport//lib/active_support/core_ext/numeric/time.rb#53
|
|
76
|
+
#: -> ActiveSupport::Duration
|
|
77
|
+
def fortnights; end
|
|
78
|
+
|
|
79
|
+
# Returns the number of bytes equivalent to the gigabytes provided.
|
|
80
|
+
#
|
|
81
|
+
# 2.gigabytes # => 2_147_483_648
|
|
82
|
+
#
|
|
83
|
+
# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#39
|
|
84
|
+
#: -> self
|
|
85
|
+
def gigabyte; end
|
|
86
|
+
|
|
87
|
+
# Returns the number of bytes equivalent to the gigabytes provided.
|
|
88
|
+
#
|
|
89
|
+
# 2.gigabytes # => 2_147_483_648
|
|
90
|
+
#
|
|
91
|
+
# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#39
|
|
92
|
+
#: -> self
|
|
93
|
+
def gigabytes; end
|
|
94
|
+
|
|
95
|
+
# Returns a Duration instance matching the number of hours provided.
|
|
96
|
+
#
|
|
97
|
+
# 2.hours # => 2 hours
|
|
98
|
+
#
|
|
99
|
+
# source://activesupport//lib/active_support/core_ext/numeric/time.rb#29
|
|
100
|
+
#: -> ActiveSupport::Duration
|
|
101
|
+
def hour; end
|
|
102
|
+
|
|
103
|
+
# Returns a Duration instance matching the number of hours provided.
|
|
104
|
+
#
|
|
105
|
+
# 2.hours # => 2 hours
|
|
106
|
+
#
|
|
107
|
+
# source://activesupport//lib/active_support/core_ext/numeric/time.rb#29
|
|
108
|
+
#: -> ActiveSupport::Duration
|
|
109
|
+
def hours; end
|
|
110
|
+
|
|
111
|
+
# @return [Boolean]
|
|
112
|
+
#
|
|
113
|
+
# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#13
|
|
114
|
+
#: -> bool
|
|
115
|
+
def html_safe?; end
|
|
116
|
+
|
|
117
|
+
# Returns the number of milliseconds equivalent to the seconds provided.
|
|
118
|
+
# Used with the standard time durations.
|
|
119
|
+
#
|
|
120
|
+
# 2.in_milliseconds # => 2000
|
|
121
|
+
# 1.hour.in_milliseconds # => 3600000
|
|
122
|
+
#
|
|
123
|
+
# source://activesupport//lib/active_support/core_ext/numeric/time.rb#63
|
|
124
|
+
#: -> self
|
|
125
|
+
def in_milliseconds; end
|
|
126
|
+
|
|
127
|
+
# Returns the number of bytes equivalent to the kilobytes provided.
|
|
128
|
+
#
|
|
129
|
+
# 2.kilobytes # => 2048
|
|
130
|
+
#
|
|
131
|
+
# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#23
|
|
132
|
+
#: -> self
|
|
133
|
+
def kilobyte; end
|
|
134
|
+
|
|
135
|
+
# Returns the number of bytes equivalent to the kilobytes provided.
|
|
136
|
+
#
|
|
137
|
+
# 2.kilobytes # => 2048
|
|
138
|
+
#
|
|
139
|
+
# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#23
|
|
140
|
+
#: -> self
|
|
141
|
+
def kilobytes; end
|
|
142
|
+
|
|
143
|
+
# Returns the number of bytes equivalent to the megabytes provided.
|
|
144
|
+
#
|
|
145
|
+
# 2.megabytes # => 2_097_152
|
|
146
|
+
#
|
|
147
|
+
# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#31
|
|
148
|
+
#: -> self
|
|
149
|
+
def megabyte; end
|
|
150
|
+
|
|
151
|
+
# Returns the number of bytes equivalent to the megabytes provided.
|
|
152
|
+
#
|
|
153
|
+
# 2.megabytes # => 2_097_152
|
|
154
|
+
#
|
|
155
|
+
# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#31
|
|
156
|
+
#: -> self
|
|
157
|
+
def megabytes; end
|
|
158
|
+
|
|
159
|
+
# Returns a Duration instance matching the number of minutes provided.
|
|
160
|
+
#
|
|
161
|
+
# 2.minutes # => 2 minutes
|
|
162
|
+
#
|
|
163
|
+
# source://activesupport//lib/active_support/core_ext/numeric/time.rb#21
|
|
164
|
+
#: -> ActiveSupport::Duration
|
|
165
|
+
def minute; end
|
|
166
|
+
|
|
167
|
+
# Returns a Duration instance matching the number of minutes provided.
|
|
168
|
+
#
|
|
169
|
+
# 2.minutes # => 2 minutes
|
|
170
|
+
#
|
|
171
|
+
# source://activesupport//lib/active_support/core_ext/numeric/time.rb#21
|
|
172
|
+
#: -> ActiveSupport::Duration
|
|
173
|
+
def minutes; end
|
|
174
|
+
|
|
175
|
+
# Returns the number of bytes equivalent to the petabytes provided.
|
|
176
|
+
#
|
|
177
|
+
# 2.petabytes # => 2_251_799_813_685_248
|
|
178
|
+
#
|
|
179
|
+
# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#55
|
|
180
|
+
#: -> self
|
|
181
|
+
def petabyte; end
|
|
182
|
+
|
|
183
|
+
# Returns the number of bytes equivalent to the petabytes provided.
|
|
184
|
+
#
|
|
185
|
+
# 2.petabytes # => 2_251_799_813_685_248
|
|
186
|
+
#
|
|
187
|
+
# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#55
|
|
188
|
+
#: -> self
|
|
189
|
+
def petabytes; end
|
|
190
|
+
|
|
191
|
+
# Returns a Duration instance matching the number of seconds provided.
|
|
192
|
+
#
|
|
193
|
+
# 2.seconds # => 2 seconds
|
|
194
|
+
#
|
|
195
|
+
# source://activesupport//lib/active_support/core_ext/numeric/time.rb#13
|
|
196
|
+
#: -> ActiveSupport::Duration
|
|
197
|
+
def second; end
|
|
198
|
+
|
|
199
|
+
# Returns a Duration instance matching the number of seconds provided.
|
|
200
|
+
#
|
|
201
|
+
# 2.seconds # => 2 seconds
|
|
202
|
+
#
|
|
203
|
+
# source://activesupport//lib/active_support/core_ext/numeric/time.rb#13
|
|
204
|
+
#: -> ActiveSupport::Duration
|
|
205
|
+
def seconds; end
|
|
206
|
+
|
|
207
|
+
# Returns the number of bytes equivalent to the terabytes provided.
|
|
208
|
+
#
|
|
209
|
+
# 2.terabytes # => 2_199_023_255_552
|
|
210
|
+
#
|
|
211
|
+
# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#47
|
|
212
|
+
#: -> self
|
|
213
|
+
def terabyte; end
|
|
214
|
+
|
|
215
|
+
# Returns the number of bytes equivalent to the terabytes provided.
|
|
216
|
+
#
|
|
217
|
+
# 2.terabytes # => 2_199_023_255_552
|
|
218
|
+
#
|
|
219
|
+
# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#47
|
|
220
|
+
#: -> self
|
|
221
|
+
def terabytes; end
|
|
222
|
+
|
|
223
|
+
# Returns a Duration instance matching the number of weeks provided.
|
|
224
|
+
#
|
|
225
|
+
# 2.weeks # => 2 weeks
|
|
226
|
+
#
|
|
227
|
+
# source://activesupport//lib/active_support/core_ext/numeric/time.rb#45
|
|
228
|
+
#: -> ActiveSupport::Duration
|
|
229
|
+
def week; end
|
|
230
|
+
|
|
231
|
+
# Returns a Duration instance matching the number of weeks provided.
|
|
232
|
+
#
|
|
233
|
+
# 2.weeks # => 2 weeks
|
|
234
|
+
#
|
|
235
|
+
# source://activesupport//lib/active_support/core_ext/numeric/time.rb#45
|
|
236
|
+
#: -> ActiveSupport::Duration
|
|
237
|
+
def weeks; end
|
|
238
|
+
|
|
239
|
+
# Returns the number of bytes equivalent to the zettabytes provided.
|
|
240
|
+
#
|
|
241
|
+
# 2.zettabytes # => 2_361_183_241_434_822_606_848
|
|
242
|
+
#
|
|
243
|
+
# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#71
|
|
244
|
+
#: -> self
|
|
245
|
+
def zettabyte; end
|
|
246
|
+
|
|
247
|
+
# Returns the number of bytes equivalent to the zettabytes provided.
|
|
248
|
+
#
|
|
249
|
+
# 2.zettabytes # => 2_361_183_241_434_822_606_848
|
|
250
|
+
#
|
|
251
|
+
# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#71
|
|
252
|
+
#: -> self
|
|
253
|
+
def zettabytes; end
|
|
254
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails-on-sorbet
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mateusz Drewniak
|
|
@@ -73,6 +73,12 @@ files:
|
|
|
73
73
|
- lib/tapioca/dsl/compilers/rails_on_sorbet_active_record_serializer.rb
|
|
74
74
|
- lib/tapioca/dsl/compilers/rails_on_sorbet_alias_association.rb
|
|
75
75
|
- lib/tapioca/dsl/compilers/rails_on_sorbet_currrent_attributes.rb
|
|
76
|
+
- rbi/action_controller.rbi
|
|
77
|
+
- rbi/current_attributes.rbi
|
|
78
|
+
- rbi/datetime.rbi
|
|
79
|
+
- rbi/duration.rbi
|
|
80
|
+
- rbi/map.rbi
|
|
81
|
+
- rbi/numeric.rbi
|
|
76
82
|
homepage: https://github.com/espago/rails-on_sorbet
|
|
77
83
|
licenses: []
|
|
78
84
|
metadata:
|