@enjoys/context-engine 1.0.0 → 1.0.2

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.
Files changed (112) hide show
  1. package/data/commands/adb.json +322 -0
  2. package/data/commands/alembic.json +301 -0
  3. package/data/commands/artisan.json +277 -0
  4. package/data/commands/atlas.json +426 -0
  5. package/data/commands/auth0.json +648 -0
  6. package/data/commands/bat.json +84 -0
  7. package/data/commands/btop.json +59 -0
  8. package/data/commands/bundle.json +321 -0
  9. package/data/commands/composer.json +507 -0
  10. package/data/commands/dart.json +216 -0
  11. package/data/commands/dbmate.json +257 -0
  12. package/data/commands/docker-compose.json +384 -0
  13. package/data/commands/drizzle-kit.json +217 -0
  14. package/data/commands/expo.json +65 -0
  15. package/data/commands/fastlane.json +243 -0
  16. package/data/commands/fd.json +86 -0
  17. package/data/commands/flutter.json +298 -0
  18. package/data/commands/flyway.json +261 -0
  19. package/data/commands/fzf.json +103 -0
  20. package/data/commands/gem.json +267 -0
  21. package/data/commands/htop.json +56 -0
  22. package/data/commands/jq.json +100 -0
  23. package/data/commands/k9s.json +62 -0
  24. package/data/commands/linux.json +3007 -0
  25. package/data/commands/liquibase.json +399 -0
  26. package/data/commands/manifest.json +619 -0
  27. package/data/commands/minikube.json +60 -0
  28. package/data/commands/ng.json +64 -0
  29. package/data/commands/nuxt.json +60 -0
  30. package/data/commands/nvim.json +91 -0
  31. package/data/commands/php.json +157 -0
  32. package/data/commands/pm2.json +259 -0
  33. package/data/commands/pod.json +175 -0
  34. package/data/commands/prisma.json +257 -0
  35. package/data/commands/rails.json +372 -0
  36. package/data/commands/rake.json +360 -0
  37. package/data/commands/react-native.json +57 -0
  38. package/data/commands/rg.json +103 -0
  39. package/data/commands/rspec.json +257 -0
  40. package/data/commands/ruby.json +108 -0
  41. package/data/commands/screen.json +101 -0
  42. package/data/commands/sequelize.json +342 -0
  43. package/data/commands/snyk.json +442 -0
  44. package/data/commands/sonar-scanner.json +219 -0
  45. package/data/commands/stripe.json +314 -0
  46. package/data/commands/symfony.json +449 -0
  47. package/data/commands/tmux.json +197 -0
  48. package/data/commands/top.json +61 -0
  49. package/data/commands/trivy.json +367 -0
  50. package/data/commands/twilio.json +382 -0
  51. package/data/commands/typeorm.json +262 -0
  52. package/data/commands/vim.json +85 -0
  53. package/data/commands/vue.json +60 -0
  54. package/data/commands/wp.json +857 -0
  55. package/data/commands/xcodebuild.json +141 -0
  56. package/data/commands/yq.json +57 -0
  57. package/data/completion/bash.json +1184 -0
  58. package/data/completion/c.json +1067 -0
  59. package/data/completion/cpp.json +824 -0
  60. package/data/completion/csharp.json +860 -0
  61. package/data/completion/dockerfile.json +536 -0
  62. package/data/completion/go.json +1346 -0
  63. package/data/completion/html.json +806 -0
  64. package/data/completion/java.json +1112 -0
  65. package/data/completion/javascript.json +914 -0
  66. package/data/completion/lua.json +968 -0
  67. package/data/completion/php.json +1535 -0
  68. package/data/completion/python.json +1427 -0
  69. package/data/completion/ruby.json +1531 -0
  70. package/data/completion/rust.json +698 -0
  71. package/data/completion/sql.json +887 -0
  72. package/data/completion/toml.json +428 -0
  73. package/data/completion/typescript.json +338 -0
  74. package/data/completion/yaml.json +563 -0
  75. package/data/defination/bash.json +565 -0
  76. package/data/defination/c.json +865 -0
  77. package/data/defination/cpp.json +348 -0
  78. package/data/defination/csharp.json +144 -0
  79. package/data/defination/dockerfile.json +113 -0
  80. package/data/defination/go.json +561 -0
  81. package/data/defination/html.json +559 -0
  82. package/data/defination/java.json +184 -0
  83. package/data/defination/javascript.json +265 -0
  84. package/data/defination/lua.json +181 -0
  85. package/data/defination/php.json +726 -0
  86. package/data/defination/python.json +717 -0
  87. package/data/defination/ruby.json +670 -0
  88. package/data/defination/rust.json +207 -0
  89. package/data/defination/sql.json +473 -0
  90. package/data/defination/toml.json +251 -0
  91. package/data/defination/typescript.json +29 -0
  92. package/data/defination/yaml.json +197 -0
  93. package/data/hover/bash.json +245 -0
  94. package/data/hover/c.json +265 -0
  95. package/data/hover/cpp.json +210 -0
  96. package/data/hover/csharp.json +290 -0
  97. package/data/hover/dockerfile.json +145 -0
  98. package/data/hover/go.json +580 -0
  99. package/data/hover/html.json +250 -0
  100. package/data/hover/java.json +395 -0
  101. package/data/hover/javascript.json +330 -0
  102. package/data/hover/lua.json +265 -0
  103. package/data/hover/php.json +300 -0
  104. package/data/hover/python.json +380 -0
  105. package/data/hover/ruby.json +265 -0
  106. package/data/hover/rust.json +275 -0
  107. package/data/hover/sql.json +230 -0
  108. package/data/hover/toml.json +145 -0
  109. package/data/hover/typescript.json +120 -0
  110. package/data/hover/yaml.json +165 -0
  111. package/data/manifest.json +242 -0
  112. package/package.json +1 -1
@@ -0,0 +1,670 @@
1
+ {
2
+ "language": "ruby",
3
+ "definitions": {
4
+ "String": {
5
+ "signature": "class String",
6
+ "description": "A String object holds an arbitrary sequence of bytes, typically representing text. Strings are mutable unless frozen. String literals can be created with single quotes, double quotes, heredocs, and percent literals.",
7
+ "type": "class",
8
+ "module": "Core",
9
+ "members": {
10
+ "length": {
11
+ "signature": "str.length -> Integer",
12
+ "description": "Returns the number of characters in the string. Multibyte characters are counted as single characters.",
13
+ "returns": "Integer"
14
+ },
15
+ "reverse": {
16
+ "signature": "str.reverse -> String",
17
+ "description": "Returns a new string with the characters in reverse order.",
18
+ "returns": "String"
19
+ },
20
+ "upcase": {
21
+ "signature": "str.upcase(*options) -> String",
22
+ "description": "Returns a copy of the string with all lowercase letters replaced with their uppercase counterparts. Supports Unicode case mapping.",
23
+ "returns": "String"
24
+ },
25
+ "downcase": {
26
+ "signature": "str.downcase(*options) -> String",
27
+ "description": "Returns a copy of the string with all uppercase letters replaced with their lowercase counterparts.",
28
+ "returns": "String"
29
+ },
30
+ "capitalize": {
31
+ "signature": "str.capitalize(*options) -> String",
32
+ "description": "Returns a copy of the string with the first character converted to uppercase and the remainder to lowercase.",
33
+ "returns": "String"
34
+ },
35
+ "strip": {
36
+ "signature": "str.strip -> String",
37
+ "description": "Returns a copy of the string with leading and trailing whitespace removed.",
38
+ "returns": "String"
39
+ },
40
+ "gsub": {
41
+ "signature": "str.gsub(pattern, replacement) -> String\nstr.gsub(pattern) { |match| block } -> String",
42
+ "description": "Returns a copy of the string with all occurrences of the pattern substituted. The pattern can be a string or a Regexp.",
43
+ "returns": "String"
44
+ },
45
+ "sub": {
46
+ "signature": "str.sub(pattern, replacement) -> String\nstr.sub(pattern) { |match| block } -> String",
47
+ "description": "Returns a copy of the string with the first occurrence of the pattern replaced.",
48
+ "returns": "String"
49
+ },
50
+ "split": {
51
+ "signature": "str.split(pattern = $;, limit = -1) -> Array",
52
+ "description": "Divides the string into substrings based on a delimiter, returning an array. Default delimiter is whitespace.",
53
+ "returns": "Array"
54
+ },
55
+ "chars": {
56
+ "signature": "str.chars -> Array",
57
+ "description": "Returns an array of characters in the string. Each element is a single-character string.",
58
+ "returns": "Array"
59
+ },
60
+ "include?": {
61
+ "signature": "str.include?(other_str) -> true or false",
62
+ "description": "Returns true if the string contains the given substring.",
63
+ "returns": "Boolean"
64
+ },
65
+ "start_with?": {
66
+ "signature": "str.start_with?(*prefixes) -> true or false",
67
+ "description": "Returns true if the string starts with any of the given prefixes. Each prefix can be a String or a Regexp.",
68
+ "returns": "Boolean"
69
+ },
70
+ "end_with?": {
71
+ "signature": "str.end_with?(*suffixes) -> true or false",
72
+ "description": "Returns true if the string ends with any of the given suffixes.",
73
+ "returns": "Boolean"
74
+ },
75
+ "match?": {
76
+ "signature": "str.match?(pattern, pos = 0) -> true or false",
77
+ "description": "Returns true if the string matches the given pattern. Faster than match because it does not create a MatchData object.",
78
+ "returns": "Boolean"
79
+ },
80
+ "scan": {
81
+ "signature": "str.scan(pattern) -> Array\nstr.scan(pattern) { |match| block } -> String",
82
+ "description": "Scans the string for all occurrences of the pattern and returns an array of matches.",
83
+ "returns": "Array"
84
+ },
85
+ "tr": {
86
+ "signature": "str.tr(from_str, to_str) -> String",
87
+ "description": "Returns a copy of the string with characters in from_str replaced by the corresponding characters in to_str.",
88
+ "returns": "String"
89
+ },
90
+ "to_i": {
91
+ "signature": "str.to_i(base = 10) -> Integer",
92
+ "description": "Interprets leading characters of the string as an integer in the given base. Returns 0 if no valid number is found.",
93
+ "returns": "Integer"
94
+ },
95
+ "to_f": {
96
+ "signature": "str.to_f -> Float",
97
+ "description": "Interprets leading characters of the string as a floating-point number. Returns 0.0 if no valid number is found.",
98
+ "returns": "Float"
99
+ },
100
+ "to_sym": {
101
+ "signature": "str.to_sym -> Symbol",
102
+ "description": "Returns the Symbol corresponding to the string, creating the symbol if it did not previously exist.",
103
+ "returns": "Symbol"
104
+ },
105
+ "encode": {
106
+ "signature": "str.encode(encoding, **options) -> String",
107
+ "description": "Returns a copy of the string transcoded to the specified encoding.",
108
+ "returns": "String"
109
+ },
110
+ "freeze": {
111
+ "signature": "str.freeze -> String",
112
+ "description": "Freezes the string, preventing further modifications. Returns the frozen string.",
113
+ "returns": "String"
114
+ },
115
+ "replace": {
116
+ "signature": "str.replace(other_str) -> String",
117
+ "description": "Replaces the contents and encoding of the string with the corresponding values from other_str.",
118
+ "returns": "String"
119
+ },
120
+ "chomp": {
121
+ "signature": "str.chomp(separator = $/) -> String",
122
+ "description": "Returns a new string with the given record separator removed from the end. Default separator is newline.",
123
+ "returns": "String"
124
+ },
125
+ "chop": {
126
+ "signature": "str.chop -> String",
127
+ "description": "Returns a new string with the last character removed. If the string ends with \\r\\n, both characters are removed.",
128
+ "returns": "String"
129
+ },
130
+ "center": {
131
+ "signature": "str.center(width, padstr = ' ') -> String",
132
+ "description": "Centers the string in a field of the given width, padding with the pad string on both sides.",
133
+ "returns": "String"
134
+ },
135
+ "ljust": {
136
+ "signature": "str.ljust(width, padstr = ' ') -> String",
137
+ "description": "Left-justifies the string in a field of the given width, padding on the right with the pad string.",
138
+ "returns": "String"
139
+ },
140
+ "rjust": {
141
+ "signature": "str.rjust(width, padstr = ' ') -> String",
142
+ "description": "Right-justifies the string in a field of the given width, padding on the left with the pad string.",
143
+ "returns": "String"
144
+ },
145
+ "squeeze": {
146
+ "signature": "str.squeeze(*selectors) -> String",
147
+ "description": "Returns a new string where runs of the same character (matching the optional selectors) are replaced by a single character.",
148
+ "returns": "String"
149
+ },
150
+ "delete": {
151
+ "signature": "str.delete(*selectors) -> String",
152
+ "description": "Returns a copy of the string with all characters in the intersection of the given selectors deleted.",
153
+ "returns": "String"
154
+ }
155
+ }
156
+ },
157
+ "Array": {
158
+ "signature": "class Array",
159
+ "description": "Arrays are ordered, integer-indexed collections of any object. Array indexing starts at 0. A negative index counts from the end. Arrays can contain mixed types and can be nested.",
160
+ "type": "class",
161
+ "module": "Core",
162
+ "members": {
163
+ "push": {
164
+ "signature": "ary.push(*objects) -> Array",
165
+ "description": "Appends the given object(s) to the end of the array. Returns the array itself, so several pushes may be chained together.",
166
+ "returns": "Array"
167
+ },
168
+ "pop": {
169
+ "signature": "ary.pop -> object or nil\nary.pop(n) -> Array",
170
+ "description": "Removes the last element from the array and returns it, or nil if the array is empty. With an argument, removes and returns the last n elements.",
171
+ "returns": "Object or Array"
172
+ },
173
+ "shift": {
174
+ "signature": "ary.shift -> object or nil\nary.shift(n) -> Array",
175
+ "description": "Removes the first element and returns it, shifting all other elements down by one. Returns nil if the array is empty.",
176
+ "returns": "Object or Array"
177
+ },
178
+ "unshift": {
179
+ "signature": "ary.unshift(*objects) -> Array",
180
+ "description": "Prepends objects to the front of the array, moving other elements upwards.",
181
+ "returns": "Array"
182
+ },
183
+ "first": {
184
+ "signature": "ary.first -> object or nil\nary.first(n) -> Array",
185
+ "description": "Returns the first element, or the first n elements as an array.",
186
+ "returns": "Object or Array"
187
+ },
188
+ "last": {
189
+ "signature": "ary.last -> object or nil\nary.last(n) -> Array",
190
+ "description": "Returns the last element, or the last n elements as an array.",
191
+ "returns": "Object or Array"
192
+ },
193
+ "length": {
194
+ "signature": "ary.length -> Integer",
195
+ "description": "Returns the number of elements in the array. Alias: size.",
196
+ "returns": "Integer"
197
+ },
198
+ "empty?": {
199
+ "signature": "ary.empty? -> true or false",
200
+ "description": "Returns true if the array contains no elements.",
201
+ "returns": "Boolean"
202
+ },
203
+ "include?": {
204
+ "signature": "ary.include?(object) -> true or false",
205
+ "description": "Returns true if any element equals the given object (using ==).",
206
+ "returns": "Boolean"
207
+ },
208
+ "flatten": {
209
+ "signature": "ary.flatten(depth = -1) -> Array",
210
+ "description": "Returns a new array that is a recursive flattening of the original. The optional depth argument limits the recursion depth.",
211
+ "returns": "Array"
212
+ },
213
+ "compact": {
214
+ "signature": "ary.compact -> Array",
215
+ "description": "Returns a new array with all nil elements removed.",
216
+ "returns": "Array"
217
+ },
218
+ "uniq": {
219
+ "signature": "ary.uniq -> Array\nary.uniq { |element| block } -> Array",
220
+ "description": "Returns a new array with duplicate values removed. If a block is given, uses the block's return value for comparison.",
221
+ "returns": "Array"
222
+ },
223
+ "sort": {
224
+ "signature": "ary.sort -> Array\nary.sort { |a, b| block } -> Array",
225
+ "description": "Returns a new array with elements sorted. Without a block, uses <=> for comparison.",
226
+ "returns": "Array"
227
+ },
228
+ "sort_by": {
229
+ "signature": "ary.sort_by { |element| block } -> Array",
230
+ "description": "Sorts elements using the values returned by the given block as sort keys.",
231
+ "returns": "Array"
232
+ },
233
+ "reverse": {
234
+ "signature": "ary.reverse -> Array",
235
+ "description": "Returns a new array with elements in reverse order.",
236
+ "returns": "Array"
237
+ },
238
+ "each": {
239
+ "signature": "ary.each { |element| block } -> Array\nary.each -> Enumerator",
240
+ "description": "Calls the given block once for each element in the array, passing that element as a parameter.",
241
+ "returns": "Array or Enumerator"
242
+ },
243
+ "map": {
244
+ "signature": "ary.map { |element| block } -> Array\nary.map -> Enumerator",
245
+ "description": "Returns a new array containing the values returned by the block for each element. Alias: collect.",
246
+ "returns": "Array or Enumerator"
247
+ },
248
+ "select": {
249
+ "signature": "ary.select { |element| block } -> Array\nary.select -> Enumerator",
250
+ "description": "Returns a new array containing all elements for which the block returns a truthy value. Alias: filter.",
251
+ "returns": "Array or Enumerator"
252
+ },
253
+ "reject": {
254
+ "signature": "ary.reject { |element| block } -> Array\nary.reject -> Enumerator",
255
+ "description": "Returns a new array excluding all elements for which the block returns a truthy value.",
256
+ "returns": "Array or Enumerator"
257
+ },
258
+ "reduce": {
259
+ "signature": "ary.reduce(initial, sym) -> object\nary.reduce(initial) { |memo, element| block } -> object",
260
+ "description": "Combines all elements by applying a binary operation, specified by a block or a symbol naming a method. Alias: inject.",
261
+ "returns": "Object"
262
+ },
263
+ "find": {
264
+ "signature": "ary.find(ifnone = nil) { |element| block } -> object or nil",
265
+ "description": "Returns the first element for which the block returns truthy, or calls ifnone if no match is found. Alias: detect.",
266
+ "returns": "Object or nil"
267
+ },
268
+ "any?": {
269
+ "signature": "ary.any? { |element| block } -> true or false\nary.any?(pattern) -> true or false",
270
+ "description": "Returns true if the block ever returns a truthy value for any element. With a pattern, checks if any element === pattern.",
271
+ "returns": "Boolean"
272
+ },
273
+ "all?": {
274
+ "signature": "ary.all? { |element| block } -> true or false\nary.all?(pattern) -> true or false",
275
+ "description": "Returns true if the block returns a truthy value for every element.",
276
+ "returns": "Boolean"
277
+ },
278
+ "none?": {
279
+ "signature": "ary.none? { |element| block } -> true or false\nary.none?(pattern) -> true or false",
280
+ "description": "Returns true if the block returns a falsy value for every element.",
281
+ "returns": "Boolean"
282
+ },
283
+ "count": {
284
+ "signature": "ary.count -> Integer\nary.count(obj) -> Integer\nary.count { |element| block } -> Integer",
285
+ "description": "Returns the number of elements. With an argument, counts elements equal to the argument. With a block, counts elements for which the block returns truthy.",
286
+ "returns": "Integer"
287
+ },
288
+ "min": {
289
+ "signature": "ary.min -> object\nary.min(n) -> Array\nary.min { |a, b| block } -> object",
290
+ "description": "Returns the minimum element, using <=> or the given block for comparison.",
291
+ "returns": "Object or Array"
292
+ },
293
+ "max": {
294
+ "signature": "ary.max -> object\nary.max(n) -> Array\nary.max { |a, b| block } -> object",
295
+ "description": "Returns the maximum element, using <=> or the given block for comparison.",
296
+ "returns": "Object or Array"
297
+ },
298
+ "sum": {
299
+ "signature": "ary.sum(init = 0) -> number\nary.sum(init = 0) { |element| block } -> number",
300
+ "description": "Returns the sum of elements. With a block, sums the results of running the block for each element.",
301
+ "returns": "Numeric"
302
+ },
303
+ "zip": {
304
+ "signature": "ary.zip(*other_arrays) -> Array\nary.zip(*other_arrays) { |arr| block } -> nil",
305
+ "description": "Merges elements of self with corresponding elements from each argument array, returning an array of arrays.",
306
+ "returns": "Array or nil"
307
+ },
308
+ "flat_map": {
309
+ "signature": "ary.flat_map { |element| block } -> Array",
310
+ "description": "Returns a new array with the concatenated results of running the block for every element. Equivalent to map then flatten(1).",
311
+ "returns": "Array"
312
+ },
313
+ "each_with_index": {
314
+ "signature": "ary.each_with_index { |element, index| block } -> Array",
315
+ "description": "Calls the block with each element and its index.",
316
+ "returns": "Array or Enumerator"
317
+ },
318
+ "group_by": {
319
+ "signature": "ary.group_by { |element| block } -> Hash",
320
+ "description": "Groups elements into a hash where keys are the block's return values and values are arrays of corresponding elements.",
321
+ "returns": "Hash"
322
+ },
323
+ "tally": {
324
+ "signature": "ary.tally -> Hash",
325
+ "description": "Counts the occurrences of each element and returns a hash. Keys are elements, values are counts.",
326
+ "returns": "Hash"
327
+ },
328
+ "sample": {
329
+ "signature": "ary.sample -> object or nil\nary.sample(n) -> Array\nary.sample(n, random: rng) -> Array",
330
+ "description": "Returns a random element or n random elements from the array.",
331
+ "returns": "Object or Array"
332
+ },
333
+ "shuffle": {
334
+ "signature": "ary.shuffle -> Array\nary.shuffle(random: rng) -> Array",
335
+ "description": "Returns a new array with elements shuffled in random order.",
336
+ "returns": "Array"
337
+ },
338
+ "join": {
339
+ "signature": "ary.join(separator = $,) -> String",
340
+ "description": "Converts each element to a string (via to_s) and joins them with the given separator.",
341
+ "returns": "String"
342
+ },
343
+ "dig": {
344
+ "signature": "ary.dig(index, *identifiers) -> object or nil",
345
+ "description": "Extracts the nested value specified by the sequence of indices. Returns nil if any intermediate step is nil.",
346
+ "returns": "Object or nil"
347
+ },
348
+ "take": {
349
+ "signature": "ary.take(n) -> Array",
350
+ "description": "Returns the first n elements of the array.",
351
+ "returns": "Array"
352
+ },
353
+ "drop": {
354
+ "signature": "ary.drop(n) -> Array",
355
+ "description": "Returns the array minus its first n elements.",
356
+ "returns": "Array"
357
+ },
358
+ "combination": {
359
+ "signature": "ary.combination(n) { |c| block } -> Array\nary.combination(n) -> Enumerator",
360
+ "description": "Yields all combinations of length n of elements from the array.",
361
+ "returns": "Array or Enumerator"
362
+ },
363
+ "permutation": {
364
+ "signature": "ary.permutation(n = self.size) { |p| block } -> Array\nary.permutation(n) -> Enumerator",
365
+ "description": "Yields all permutations of length n of elements from the array.",
366
+ "returns": "Array or Enumerator"
367
+ },
368
+ "intersection": {
369
+ "signature": "ary.intersection(*other_arrays) -> Array",
370
+ "description": "Returns a new array containing elements common to self and all given arrays, removing duplicates. Order is preserved from self.",
371
+ "returns": "Array"
372
+ },
373
+ "union": {
374
+ "signature": "ary.union(*other_arrays) -> Array",
375
+ "description": "Returns a new array that is the union of self and all given arrays, removing duplicates. Order is preserved.",
376
+ "returns": "Array"
377
+ },
378
+ "difference": {
379
+ "signature": "ary.difference(*other_arrays) -> Array",
380
+ "description": "Returns a new array containing elements from self that are not in any of the given arrays.",
381
+ "returns": "Array"
382
+ }
383
+ }
384
+ },
385
+ "Hash": {
386
+ "signature": "class Hash",
387
+ "description": "A Hash is a collection of key-value pairs. It is similar to an Array, except that indexing is done via arbitrary keys of any type, not integer indices. The order of key-value pairs is the insertion order.",
388
+ "type": "class",
389
+ "module": "Core",
390
+ "members": {
391
+ "keys": {
392
+ "signature": "hsh.keys -> Array",
393
+ "description": "Returns a new array populated with the keys from the hash.",
394
+ "returns": "Array"
395
+ },
396
+ "values": {
397
+ "signature": "hsh.values -> Array",
398
+ "description": "Returns a new array populated with the values from the hash.",
399
+ "returns": "Array"
400
+ },
401
+ "each": {
402
+ "signature": "hsh.each { |key, value| block } -> Hash\nhsh.each -> Enumerator",
403
+ "description": "Calls the block once for each key-value pair in the hash, passing the key and value as parameters.",
404
+ "returns": "Hash or Enumerator"
405
+ },
406
+ "map": {
407
+ "signature": "hsh.map { |key, value| block } -> Array",
408
+ "description": "Returns a new array with the results of running the block once for every key-value pair.",
409
+ "returns": "Array"
410
+ },
411
+ "select": {
412
+ "signature": "hsh.select { |key, value| block } -> Hash\nhsh.select -> Enumerator",
413
+ "description": "Returns a new hash consisting of key-value pairs for which the block returns a truthy value. Alias: filter.",
414
+ "returns": "Hash or Enumerator"
415
+ },
416
+ "reject": {
417
+ "signature": "hsh.reject { |key, value| block } -> Hash",
418
+ "description": "Returns a new hash consisting of key-value pairs for which the block returns a falsy value.",
419
+ "returns": "Hash"
420
+ },
421
+ "merge": {
422
+ "signature": "hsh.merge(*other_hashes) -> Hash\nhsh.merge(*other_hashes) { |key, old_val, new_val| block } -> Hash",
423
+ "description": "Returns a new hash containing the contents of self and the other hashes. For duplicate keys, the value from the last hash wins, unless a block is given.",
424
+ "returns": "Hash"
425
+ },
426
+ "fetch": {
427
+ "signature": "hsh.fetch(key) -> value\nhsh.fetch(key, default) -> value\nhsh.fetch(key) { |key| block } -> value",
428
+ "description": "Returns the value for the given key. If the key is not found, raises KeyError (no default), returns the default value, or calls the block.",
429
+ "returns": "Object"
430
+ },
431
+ "dig": {
432
+ "signature": "hsh.dig(key, *identifiers) -> object or nil",
433
+ "description": "Extracts the nested value specified by the sequence of keys. Returns nil if any intermediate step is nil.",
434
+ "returns": "Object or nil"
435
+ },
436
+ "has_key?": {
437
+ "signature": "hsh.has_key?(key) -> true or false",
438
+ "description": "Returns true if the given key is present in the hash. Aliases: include?, key?, member?.",
439
+ "returns": "Boolean"
440
+ },
441
+ "delete": {
442
+ "signature": "hsh.delete(key) -> value or nil\nhsh.delete(key) { |key| block } -> value",
443
+ "description": "Deletes the key-value pair and returns the value. If the key is not found, returns nil or calls the block.",
444
+ "returns": "Object or nil"
445
+ },
446
+ "transform_keys": {
447
+ "signature": "hsh.transform_keys { |key| block } -> Hash\nhsh.transform_keys(hash_mapping) -> Hash",
448
+ "description": "Returns a new hash with keys transformed by the block or mapping. Added in Ruby 2.5.",
449
+ "returns": "Hash"
450
+ },
451
+ "transform_values": {
452
+ "signature": "hsh.transform_values { |value| block } -> Hash",
453
+ "description": "Returns a new hash with values transformed by the block.",
454
+ "returns": "Hash"
455
+ },
456
+ "to_a": {
457
+ "signature": "hsh.to_a -> Array",
458
+ "description": "Converts the hash to a nested array of [key, value] pairs.",
459
+ "returns": "Array"
460
+ },
461
+ "invert": {
462
+ "signature": "hsh.invert -> Hash",
463
+ "description": "Returns a new hash with keys and values swapped. If there are duplicate values, the last one wins.",
464
+ "returns": "Hash"
465
+ },
466
+ "any?": {
467
+ "signature": "hsh.any? { |key, value| block } -> true or false",
468
+ "description": "Returns true if the block returns a truthy value for any key-value pair.",
469
+ "returns": "Boolean"
470
+ },
471
+ "all?": {
472
+ "signature": "hsh.all? { |key, value| block } -> true or false",
473
+ "description": "Returns true if the block returns a truthy value for every key-value pair.",
474
+ "returns": "Boolean"
475
+ },
476
+ "count": {
477
+ "signature": "hsh.count -> Integer\nhsh.count { |key, value| block } -> Integer",
478
+ "description": "Returns the number of key-value pairs. With a block, counts pairs for which the block returns truthy.",
479
+ "returns": "Integer"
480
+ },
481
+ "empty?": {
482
+ "signature": "hsh.empty? -> true or false",
483
+ "description": "Returns true if the hash contains no key-value pairs.",
484
+ "returns": "Boolean"
485
+ },
486
+ "slice": {
487
+ "signature": "hsh.slice(*keys) -> Hash",
488
+ "description": "Returns a new hash containing only the given keys and their values. Added in Ruby 2.5.",
489
+ "returns": "Hash"
490
+ },
491
+ "except": {
492
+ "signature": "hsh.except(*keys) -> Hash",
493
+ "description": "Returns a new hash excluding the specified keys. Added in Ruby 3.0.",
494
+ "returns": "Hash"
495
+ }
496
+ }
497
+ },
498
+ "Enumerable": {
499
+ "signature": "module Enumerable",
500
+ "description": "The Enumerable mixin provides collection classes with traversal, searching, and sorting methods. The class must provide a method each, which yields successive members of the collection. Many core classes include Enumerable: Array, Hash, Range, Set, etc.",
501
+ "type": "module",
502
+ "module": "Core",
503
+ "members": {
504
+ "each": {
505
+ "signature": "enum.each { |element| block } -> enum",
506
+ "description": "Calls the given block once for each element in the collection. Required method for Enumerable inclusion.",
507
+ "returns": "Enumerator or self"
508
+ },
509
+ "map": {
510
+ "signature": "enum.map { |element| block } -> Array",
511
+ "description": "Returns a new array with the results of running the block for every element. Alias: collect.",
512
+ "returns": "Array"
513
+ },
514
+ "select": {
515
+ "signature": "enum.select { |element| block } -> Array",
516
+ "description": "Returns an array of all elements for which the block returns a truthy value. Alias: filter.",
517
+ "returns": "Array"
518
+ },
519
+ "reject": {
520
+ "signature": "enum.reject { |element| block } -> Array",
521
+ "description": "Returns an array of all elements for which the block returns a falsy value.",
522
+ "returns": "Array"
523
+ },
524
+ "reduce": {
525
+ "signature": "enum.reduce(initial, sym) -> object\nenum.reduce(initial) { |memo, element| block } -> object",
526
+ "description": "Combines all elements by applying a binary operation. Alias: inject.",
527
+ "returns": "Object"
528
+ },
529
+ "flat_map": {
530
+ "signature": "enum.flat_map { |element| block } -> Array",
531
+ "description": "Returns a new array with the concatenated results of running the block for every element, then flattening one level.",
532
+ "returns": "Array"
533
+ },
534
+ "group_by": {
535
+ "signature": "enum.group_by { |element| block } -> Hash",
536
+ "description": "Groups the collection's elements into a hash keyed by the block's return value.",
537
+ "returns": "Hash"
538
+ },
539
+ "sort_by": {
540
+ "signature": "enum.sort_by { |element| block } -> Array",
541
+ "description": "Sorts elements by the values returned by the block. Uses a Schwartzian transform internally.",
542
+ "returns": "Array"
543
+ },
544
+ "min_by": {
545
+ "signature": "enum.min_by { |element| block } -> object\nenum.min_by(n) { |element| block } -> Array",
546
+ "description": "Returns the element for which the block returns the minimum value.",
547
+ "returns": "Object or Array"
548
+ },
549
+ "max_by": {
550
+ "signature": "enum.max_by { |element| block } -> object\nenum.max_by(n) { |element| block } -> Array",
551
+ "description": "Returns the element for which the block returns the maximum value.",
552
+ "returns": "Object or Array"
553
+ },
554
+ "tally": {
555
+ "signature": "enum.tally -> Hash\nenum.tally_by { |element| block } -> Hash",
556
+ "description": "Counts occurrences of each element and returns a hash. Added in Ruby 2.7.",
557
+ "returns": "Hash"
558
+ },
559
+ "sum": {
560
+ "signature": "enum.sum(init = 0) -> number\nenum.sum(init = 0) { |element| block } -> number",
561
+ "description": "Returns the sum of elements, optionally transformed by a block.",
562
+ "returns": "Numeric"
563
+ },
564
+ "zip": {
565
+ "signature": "enum.zip(*lists) -> Array",
566
+ "description": "Takes one element from the enumerable and merges corresponding elements from each argument.",
567
+ "returns": "Array"
568
+ },
569
+ "lazy": {
570
+ "signature": "enum.lazy -> Enumerator::Lazy",
571
+ "description": "Returns a lazy enumerator. Transformations are deferred until values are needed, enabling work with infinite sequences.",
572
+ "returns": "Enumerator::Lazy"
573
+ },
574
+ "filter_map": {
575
+ "signature": "enum.filter_map { |element| block } -> Array",
576
+ "description": "Returns an array containing the truthy results of running the block for every element. Equivalent to filter + map in one pass. Added in Ruby 2.7.",
577
+ "returns": "Array"
578
+ },
579
+ "each_with_object": {
580
+ "signature": "enum.each_with_object(obj) { |element, obj| block } -> obj",
581
+ "description": "Iterates over the collection, passing each element and the given object to the block. Returns the object.",
582
+ "returns": "Object"
583
+ },
584
+ "chunk": {
585
+ "signature": "enum.chunk { |element| block } -> Enumerator",
586
+ "description": "Enumerates over items, chunking them together based on consecutive elements that return the same block value.",
587
+ "returns": "Enumerator"
588
+ }
589
+ }
590
+ },
591
+ "File": {
592
+ "signature": "class File < IO",
593
+ "description": "File is an abstraction of any file object accessible in the underlying operating system. File includes the methods of module FileTest as class methods.",
594
+ "type": "class",
595
+ "module": "Core",
596
+ "members": {
597
+ "read": {
598
+ "signature": "File.read(filename, length = nil, offset = 0, **opts) -> String",
599
+ "description": "Opens the file, optionally seeks to the given offset, reads length bytes (or all if nil), closes the file, and returns the data as a string.",
600
+ "returns": "String"
601
+ },
602
+ "write": {
603
+ "signature": "File.write(filename, string, offset = nil, **opts) -> Integer",
604
+ "description": "Opens the file, optionally seeks to the given offset, writes the string, closes the file, and returns the number of bytes written.",
605
+ "returns": "Integer"
606
+ },
607
+ "open": {
608
+ "signature": "File.open(filename, mode = 'r', **opts) -> File\nFile.open(filename, mode = 'r', **opts) { |f| block } -> object",
609
+ "description": "With no block, opens the file and returns a File object. With a block, passes the File to the block and ensures the file is closed afterward.",
610
+ "returns": "File or Object"
611
+ },
612
+ "exist?": {
613
+ "signature": "File.exist?(path) -> true or false",
614
+ "description": "Returns true if the named file exists. Follows symbolic links.",
615
+ "returns": "Boolean"
616
+ },
617
+ "delete": {
618
+ "signature": "File.delete(*filenames) -> Integer",
619
+ "description": "Deletes the named file(s). Returns the number of files deleted. Alias: unlink.",
620
+ "returns": "Integer"
621
+ },
622
+ "rename": {
623
+ "signature": "File.rename(old_name, new_name) -> 0",
624
+ "description": "Renames the given file to the new name. Raises SystemCallError on failure.",
625
+ "returns": "Integer"
626
+ },
627
+ "join": {
628
+ "signature": "File.join(*parts) -> String",
629
+ "description": "Returns a new string consisting of the parts joined with File::SEPARATOR.",
630
+ "returns": "String"
631
+ },
632
+ "dirname": {
633
+ "signature": "File.dirname(path, level = 1) -> String",
634
+ "description": "Returns all components of the filename given in path except the last one.",
635
+ "returns": "String"
636
+ },
637
+ "basename": {
638
+ "signature": "File.basename(path, suffix = '') -> String",
639
+ "description": "Returns the last component of the filename. If suffix is given, it is removed from the result.",
640
+ "returns": "String"
641
+ },
642
+ "extname": {
643
+ "signature": "File.extname(path) -> String",
644
+ "description": "Returns the extension (the portion of the file name after the last dot, including the dot).",
645
+ "returns": "String"
646
+ },
647
+ "size": {
648
+ "signature": "File.size(path) -> Integer",
649
+ "description": "Returns the size of the file in bytes.",
650
+ "returns": "Integer"
651
+ },
652
+ "mtime": {
653
+ "signature": "File.mtime(path) -> Time",
654
+ "description": "Returns the modification time of the named file as a Time object.",
655
+ "returns": "Time"
656
+ },
657
+ "directory?": {
658
+ "signature": "File.directory?(path) -> true or false",
659
+ "description": "Returns true if the named file is a directory.",
660
+ "returns": "Boolean"
661
+ },
662
+ "file?": {
663
+ "signature": "File.file?(path) -> true or false",
664
+ "description": "Returns true if the named file exists and is a regular file.",
665
+ "returns": "Boolean"
666
+ }
667
+ }
668
+ }
669
+ }
670
+ }