workos 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +5 -2
  3. data/Gemfile.lock +6 -2
  4. data/README.md +179 -8
  5. data/bin/docs +2 -2
  6. data/codecov.yml +1 -0
  7. data/docs/WorkOS.html +22 -26
  8. data/docs/WorkOS/APIError.html +160 -0
  9. data/docs/WorkOS/AuditLog.html +235 -0
  10. data/docs/WorkOS/AuthenticationError.html +160 -0
  11. data/docs/WorkOS/Base.html +27 -32
  12. data/docs/WorkOS/Client.html +493 -0
  13. data/docs/WorkOS/InvalidRequestError.html +160 -0
  14. data/docs/WorkOS/Profile.html +80 -17
  15. data/docs/WorkOS/RequestError.html +6 -6
  16. data/docs/WorkOS/SSO.html +118 -74
  17. data/docs/WorkOS/Types.html +9 -10
  18. data/docs/WorkOS/Types/ProfileStruct.html +6 -6
  19. data/docs/WorkOS/Types/Provider.html +135 -0
  20. data/docs/WorkOS/WorkOSError.html +447 -0
  21. data/docs/class_list.html +3 -3
  22. data/docs/css/style.css +2 -2
  23. data/docs/file.README.html +173 -13
  24. data/docs/file_list.html +2 -2
  25. data/docs/frames.html +2 -2
  26. data/docs/index.html +77 -16
  27. data/docs/js/app.js +14 -3
  28. data/docs/method_list.html +96 -8
  29. data/docs/top-level-namespace.html +6 -6
  30. data/lib/workos.rb +7 -2
  31. data/lib/workos/audit_log.rb +78 -0
  32. data/lib/workos/base.rb +5 -6
  33. data/lib/workos/client.rb +86 -0
  34. data/lib/workos/errors.rb +48 -0
  35. data/lib/workos/sso.rb +49 -27
  36. data/lib/workos/types.rb +2 -1
  37. data/lib/workos/types/provider_enum.rb +14 -0
  38. data/lib/workos/version.rb +2 -2
  39. data/sorbet/rbi/hidden-definitions/errors.txt +22108 -4368
  40. data/sorbet/rbi/hidden-definitions/hidden.rbi +32490 -6059
  41. data/sorbet/rbi/sorbet-typed/lib/rainbow/all/rainbow.rbi +1 -1
  42. data/sorbet/rbi/todo.rbi +5 -0
  43. data/spec/lib/workos/audit_log_spec.rb +140 -0
  44. data/spec/lib/workos/base_spec.rb +30 -0
  45. data/spec/lib/workos/sso_spec.rb +131 -36
  46. data/spec/spec_helper.rb +21 -1
  47. data/spec/support/fixtures/vcr_cassettes/audit_log/create_event.yml +65 -0
  48. data/spec/support/fixtures/vcr_cassettes/audit_log/create_event_custom_idempotency_key.yml +67 -0
  49. data/spec/support/fixtures/vcr_cassettes/audit_log/create_event_invalid.yml +68 -0
  50. data/spec/support/fixtures/vcr_cassettes/audit_log/create_events_duplicate_idempotency_key_and_payload.yml +131 -0
  51. data/spec/support/fixtures/vcr_cassettes/audit_log/create_events_duplicate_idempotency_key_different_payload.yml +134 -0
  52. data/spec/support/fixtures/vcr_cassettes/base/execute_request_unauthenticated.yml +66 -0
  53. data/workos.gemspec +2 -0
  54. metadata +57 -27
  55. data/lib/workos/request_error.rb +0 -5
  56. data/sorbet/rbi/gems/addressable.rbi +0 -198
  57. data/sorbet/rbi/gems/ast.rbi +0 -47
  58. data/sorbet/rbi/gems/codecov.rbi +0 -19
  59. data/sorbet/rbi/gems/crack.rbi +0 -47
  60. data/sorbet/rbi/gems/docile.rbi +0 -31
  61. data/sorbet/rbi/gems/hashdiff.rbi +0 -65
  62. data/sorbet/rbi/gems/jaro_winkler.rbi +0 -14
  63. data/sorbet/rbi/gems/parallel.rbi +0 -81
  64. data/sorbet/rbi/gems/parser.rbi +0 -856
  65. data/sorbet/rbi/gems/public_suffix.rbi +0 -102
  66. data/sorbet/rbi/gems/rack.rbi +0 -103
  67. data/sorbet/rbi/gems/rainbow.rbi +0 -117
  68. data/sorbet/rbi/gems/rake.rbi +0 -632
  69. data/sorbet/rbi/gems/rspec-core.rbi +0 -1661
  70. data/sorbet/rbi/gems/rspec-expectations.rbi +0 -388
  71. data/sorbet/rbi/gems/rspec-mocks.rbi +0 -823
  72. data/sorbet/rbi/gems/rspec-support.rbi +0 -266
  73. data/sorbet/rbi/gems/rspec.rbi +0 -14
  74. data/sorbet/rbi/gems/rubocop.rbi +0 -7083
  75. data/sorbet/rbi/gems/ruby-progressbar.rbi +0 -304
  76. data/sorbet/rbi/gems/simplecov-html.rbi +0 -30
  77. data/sorbet/rbi/gems/simplecov.rbi +0 -225
  78. data/sorbet/rbi/gems/unicode-display_width.rbi +0 -16
  79. data/sorbet/rbi/gems/webmock.rbi +0 -526
@@ -1,19 +0,0 @@
1
- # This file is autogenerated. Do not edit it by hand. Regenerate it with:
2
- # srb rbi gems
3
-
4
- # typed: strong
5
- #
6
- # If you would like to make changes to this file, great! Please create the gem's shim here:
7
- #
8
- # https://github.com/sorbet/sorbet-typed/new/master?filename=lib/codecov/all/codecov.rbi
9
- #
10
- # codecov-0.1.16
11
- class SimpleCov::Formatter::Codecov
12
- def file_to_codecov(file); end
13
- def format(result); end
14
- def net_blockers(switch); end
15
- def result_to_codecov(result); end
16
- def result_to_codecov_coverage(result); end
17
- def result_to_codecov_messages(result); end
18
- def shortened_filename(file); end
19
- end
@@ -1,47 +0,0 @@
1
- # This file is autogenerated. Do not edit it by hand. Regenerate it with:
2
- # srb rbi gems
3
-
4
- # typed: strong
5
- #
6
- # If you would like to make changes to this file, great! Please create the gem's shim here:
7
- #
8
- # https://github.com/sorbet/sorbet-typed/new/master?filename=lib/crack/all/crack.rbi
9
- #
10
- # crack-0.4.3
11
- class REXMLUtiliyNodeString < String
12
- def attributes; end
13
- def attributes=(arg0); end
14
- end
15
- class REXMLUtilityNode
16
- def add_node(node); end
17
- def attributes; end
18
- def attributes=(arg0); end
19
- def children; end
20
- def children=(arg0); end
21
- def initialize(name, normalized_attributes = nil); end
22
- def inner_html; end
23
- def name; end
24
- def name=(arg0); end
25
- def self.available_typecasts; end
26
- def self.available_typecasts=(obj); end
27
- def self.typecasts; end
28
- def self.typecasts=(obj); end
29
- def to_hash; end
30
- def to_html; end
31
- def to_s; end
32
- def type; end
33
- def type=(arg0); end
34
- def typecast_value(value); end
35
- def undasherize_keys(params); end
36
- def unnormalize_xml_entities(value); end
37
- end
38
- module Crack
39
- end
40
- class Crack::REXMLParser
41
- def self.parse(xml); end
42
- end
43
- class Crack::XML
44
- def self.parse(xml); end
45
- def self.parser; end
46
- def self.parser=(parser); end
47
- end
@@ -1,31 +0,0 @@
1
- # This file is autogenerated. Do not edit it by hand. Regenerate it with:
2
- # srb rbi gems
3
-
4
- # typed: strong
5
- #
6
- # If you would like to make changes to this file, great! Please create the gem's shim here:
7
- #
8
- # https://github.com/sorbet/sorbet-typed/new/master?filename=lib/docile/all/docile.rbi
9
- #
10
- # docile-1.3.2
11
- module Docile
12
- def dsl_eval(dsl, *args, &block); end
13
- def dsl_eval_immutable(dsl, *args, &block); end
14
- def dsl_eval_with_block_return(dsl, *args, &block); end
15
- def self.dsl_eval(dsl, *args, &block); end
16
- def self.dsl_eval_immutable(dsl, *args, &block); end
17
- def self.dsl_eval_with_block_return(dsl, *args, &block); end
18
- extend Docile::Execution
19
- end
20
- module Docile::Execution
21
- def exec_in_proxy_context(dsl, proxy_type, *args, &block); end
22
- def self.exec_in_proxy_context(dsl, proxy_type, *args, &block); end
23
- end
24
- class Docile::FallbackContextProxy
25
- def initialize(receiver, fallback); end
26
- def instance_variables; end
27
- def method_missing(method, *args, &block); end
28
- end
29
- class Docile::ChainingFallbackContextProxy < Docile::FallbackContextProxy
30
- def method_missing(method, *args, &block); end
31
- end
@@ -1,65 +0,0 @@
1
- # This file is autogenerated. Do not edit it by hand. Regenerate it with:
2
- # srb rbi gems
3
-
4
- # typed: strong
5
- #
6
- # If you would like to make changes to this file, great! Please create the gem's shim here:
7
- #
8
- # https://github.com/sorbet/sorbet-typed/new/master?filename=lib/hashdiff/all/hashdiff.rbi
9
- #
10
- # hashdiff-1.0.0
11
- module Hashdiff
12
- def self.any_hash_or_array?(obja, objb); end
13
- def self.best_diff(obj1, obj2, options = nil, &block); end
14
- def self.comparable?(obj1, obj2, strict = nil); end
15
- def self.compare_values(obj1, obj2, options = nil); end
16
- def self.count_diff(diffs); end
17
- def self.count_nodes(obj); end
18
- def self.custom_compare(method, key, obj1, obj2); end
19
- def self.decode_property_path(path, delimiter = nil); end
20
- def self.diff(obj1, obj2, options = nil, &block); end
21
- def self.diff_array_lcs(arraya, arrayb, options = nil); end
22
- def self.lcs(arraya, arrayb, options = nil); end
23
- def self.node(hash, parts); end
24
- def self.patch!(obj, changes, options = nil); end
25
- def self.prefix_append_array_index(prefix, array_index, opts); end
26
- def self.prefix_append_key(prefix, key, opts); end
27
- def self.similar?(obja, objb, options = nil); end
28
- def self.unpatch!(obj, changes, options = nil); end
29
- end
30
- class Hashdiff::CompareHashes
31
- def self.call(obj1, obj2, opts = nil); end
32
- end
33
- class Hashdiff::LcsCompareArrays
34
- def self.call(obj1, obj2, opts = nil); end
35
- end
36
- class Hashdiff::LinearCompareArray
37
- def additions; end
38
- def append_addition(item, index); end
39
- def append_addititions_before_match(match_index); end
40
- def append_deletion(item, index); end
41
- def append_deletions_before_match(match_index); end
42
- def append_differences(difference); end
43
- def call; end
44
- def changes; end
45
- def compare_at_index; end
46
- def deletions; end
47
- def differences; end
48
- def expected_additions; end
49
- def expected_additions=(arg0); end
50
- def extra_items_in_new_array?; end
51
- def extra_items_in_old_array?; end
52
- def index_of_match_after_additions; end
53
- def index_of_match_after_deletions; end
54
- def initialize(old_array, new_array, options); end
55
- def item_difference(old_item, new_item, item_index); end
56
- def iterated_through_both_arrays?; end
57
- def new_array; end
58
- def new_index; end
59
- def new_index=(arg0); end
60
- def old_array; end
61
- def old_index; end
62
- def old_index=(arg0); end
63
- def options; end
64
- def self.call(old_array, new_array, options = nil); end
65
- end
@@ -1,14 +0,0 @@
1
- # This file is autogenerated. Do not edit it by hand. Regenerate it with:
2
- # srb rbi gems
3
-
4
- # typed: strong
5
- #
6
- # If you would like to make changes to this file, great! Please create the gem's shim here:
7
- #
8
- # https://github.com/sorbet/sorbet-typed/new/master?filename=lib/jaro_winkler/all/jaro_winkler.rbi
9
- #
10
- # jaro_winkler-1.5.4
11
- module JaroWinkler
12
- def self.distance(*arg0); end
13
- def self.jaro_distance(*arg0); end
14
- end
@@ -1,81 +0,0 @@
1
- # This file is autogenerated. Do not edit it by hand. Regenerate it with:
2
- # srb rbi gems
3
-
4
- # typed: strong
5
- #
6
- # If you would like to make changes to this file, great! Please create the gem's shim here:
7
- #
8
- # https://github.com/sorbet/sorbet-typed/new/master?filename=lib/parallel/all/parallel.rbi
9
- #
10
- # parallel-1.19.1
11
- module Parallel
12
- def self.add_progress_bar!(job_factory, options); end
13
- def self.all?(*args, &block); end
14
- def self.any?(*args, &block); end
15
- def self.call_with_index(item, index, options, &block); end
16
- def self.create_workers(job_factory, options, &block); end
17
- def self.each(array, options = nil, &block); end
18
- def self.each_with_index(array, options = nil, &block); end
19
- def self.extract_count_from_options(options); end
20
- def self.flat_map(*args, &block); end
21
- def self.handle_exception(exception, results); end
22
- def self.in_processes(options = nil, &block); end
23
- def self.in_threads(options = nil); end
24
- def self.map(source, options = nil, &block); end
25
- def self.map_with_index(array, options = nil, &block); end
26
- def self.process_incoming_jobs(read, write, job_factory, options, &block); end
27
- def self.replace_worker(job_factory, workers, i, options, blk); end
28
- def self.with_instrumentation(item, index, options); end
29
- def self.work_direct(job_factory, options, &block); end
30
- def self.work_in_processes(job_factory, options, &blk); end
31
- def self.work_in_threads(job_factory, options, &block); end
32
- def self.worker(job_factory, options, &block); end
33
- def self.worker_number; end
34
- def self.worker_number=(worker_num); end
35
- extend Parallel::ProcessorCount
36
- end
37
- module Parallel::ProcessorCount
38
- def physical_processor_count; end
39
- def processor_count; end
40
- end
41
- class Parallel::DeadWorker < StandardError
42
- end
43
- class Parallel::Break < StandardError
44
- end
45
- class Parallel::Kill < StandardError
46
- end
47
- class Parallel::UndumpableException < StandardError
48
- def backtrace; end
49
- def initialize(original); end
50
- end
51
- class Parallel::ExceptionWrapper
52
- def exception; end
53
- def initialize(exception); end
54
- end
55
- class Parallel::Worker
56
- def close_pipes; end
57
- def initialize(read, write, pid); end
58
- def pid; end
59
- def read; end
60
- def stop; end
61
- def thread; end
62
- def thread=(arg0); end
63
- def wait; end
64
- def work(data); end
65
- def write; end
66
- end
67
- class Parallel::JobFactory
68
- def initialize(source, mutex); end
69
- def next; end
70
- def pack(item, index); end
71
- def producer?; end
72
- def queue_wrapper(array); end
73
- def size; end
74
- def unpack(data); end
75
- end
76
- class Parallel::UserInterruptHandler
77
- def self.kill(thing); end
78
- def self.kill_on_ctrl_c(pids, options); end
79
- def self.restore_interrupt(old, signal); end
80
- def self.trap_interrupt(signal); end
81
- end
@@ -1,856 +0,0 @@
1
- # This file is autogenerated. Do not edit it by hand. Regenerate it with:
2
- # srb rbi gems
3
-
4
- # typed: strong
5
- #
6
- # If you would like to make changes to this file, great! Please create the gem's shim here:
7
- #
8
- # https://github.com/sorbet/sorbet-typed/new/master?filename=lib/parser/all/parser.rbi
9
- #
10
- # parser-2.6.5.0
11
- module Parser
12
- end
13
- module Parser::Deprecation
14
- def warn_of_deprecation; end
15
- def warned_of_deprecation=(arg0); end
16
- end
17
- module Parser::AST
18
- end
19
- class Parser::AST::Node < AST::Node
20
- def assign_properties(properties); end
21
- def loc; end
22
- def location; end
23
- end
24
- class Parser::AST::Processor < AST::Processor
25
- def on_alias(node); end
26
- def on_and(node); end
27
- def on_and_asgn(node); end
28
- def on_arg(node); end
29
- def on_arg_expr(node); end
30
- def on_args(node); end
31
- def on_argument(node); end
32
- def on_array(node); end
33
- def on_back_ref(node); end
34
- def on_begin(node); end
35
- def on_block(node); end
36
- def on_block_pass(node); end
37
- def on_blockarg(node); end
38
- def on_blockarg_expr(node); end
39
- def on_break(node); end
40
- def on_case(node); end
41
- def on_casgn(node); end
42
- def on_class(node); end
43
- def on_const(node); end
44
- def on_csend(node); end
45
- def on_cvar(node); end
46
- def on_cvasgn(node); end
47
- def on_def(node); end
48
- def on_defined?(node); end
49
- def on_defs(node); end
50
- def on_dstr(node); end
51
- def on_dsym(node); end
52
- def on_eflipflop(node); end
53
- def on_ensure(node); end
54
- def on_erange(node); end
55
- def on_for(node); end
56
- def on_gvar(node); end
57
- def on_gvasgn(node); end
58
- def on_hash(node); end
59
- def on_if(node); end
60
- def on_iflipflop(node); end
61
- def on_index(node); end
62
- def on_indexasgn(node); end
63
- def on_irange(node); end
64
- def on_ivar(node); end
65
- def on_ivasgn(node); end
66
- def on_kwarg(node); end
67
- def on_kwbegin(node); end
68
- def on_kwoptarg(node); end
69
- def on_kwrestarg(node); end
70
- def on_kwsplat(node); end
71
- def on_lambda(node); end
72
- def on_lvar(node); end
73
- def on_lvasgn(node); end
74
- def on_masgn(node); end
75
- def on_match_current_line(node); end
76
- def on_match_with_lvasgn(node); end
77
- def on_mlhs(node); end
78
- def on_module(node); end
79
- def on_next(node); end
80
- def on_not(node); end
81
- def on_nth_ref(node); end
82
- def on_numblock(node); end
83
- def on_op_asgn(node); end
84
- def on_optarg(node); end
85
- def on_or(node); end
86
- def on_or_asgn(node); end
87
- def on_pair(node); end
88
- def on_postexe(node); end
89
- def on_preexe(node); end
90
- def on_procarg0(node); end
91
- def on_redo(node); end
92
- def on_regexp(node); end
93
- def on_resbody(node); end
94
- def on_rescue(node); end
95
- def on_restarg(node); end
96
- def on_restarg_expr(node); end
97
- def on_retry(node); end
98
- def on_return(node); end
99
- def on_sclass(node); end
100
- def on_send(node); end
101
- def on_shadowarg(node); end
102
- def on_splat(node); end
103
- def on_super(node); end
104
- def on_undef(node); end
105
- def on_until(node); end
106
- def on_until_post(node); end
107
- def on_var(node); end
108
- def on_vasgn(node); end
109
- def on_when(node); end
110
- def on_while(node); end
111
- def on_while_post(node); end
112
- def on_xstr(node); end
113
- def on_yield(node); end
114
- def process_argument_node(node); end
115
- def process_regular_node(node); end
116
- def process_var_asgn_node(node); end
117
- def process_variable_node(node); end
118
- end
119
- module Parser::Meta
120
- end
121
- module Parser::Source
122
- end
123
- class Parser::Source::Buffer
124
- def column_for_position(position); end
125
- def decompose_position(position); end
126
- def first_line; end
127
- def initialize(name, first_line = nil); end
128
- def last_line; end
129
- def line_begins; end
130
- def line_for(position); end
131
- def line_for_position(position); end
132
- def line_range(lineno); end
133
- def name; end
134
- def raw_source=(input); end
135
- def read; end
136
- def self.recognize_encoding(string); end
137
- def self.reencode_string(input); end
138
- def slice(range); end
139
- def source; end
140
- def source=(input); end
141
- def source_line(lineno); end
142
- def source_lines; end
143
- def source_range; end
144
- end
145
- class Parser::Source::Range
146
- def <=>(other); end
147
- def adjust(begin_pos: nil, end_pos: nil); end
148
- def begin; end
149
- def begin_pos; end
150
- def column; end
151
- def column_range; end
152
- def contained?(other); end
153
- def contains?(other); end
154
- def crossing?(other); end
155
- def disjoint?(other); end
156
- def empty?; end
157
- def end; end
158
- def end_pos; end
159
- def first_line; end
160
- def initialize(source_buffer, begin_pos, end_pos); end
161
- def inspect; end
162
- def intersect(other); end
163
- def is?(*what); end
164
- def join(other); end
165
- def last_column; end
166
- def last_line; end
167
- def length; end
168
- def line; end
169
- def overlaps?(other); end
170
- def resize(new_size); end
171
- def size; end
172
- def source; end
173
- def source_buffer; end
174
- def source_line; end
175
- def to_a; end
176
- def to_s; end
177
- def with(begin_pos: nil, end_pos: nil); end
178
- include Comparable
179
- end
180
- class Parser::Source::Comment
181
- def ==(other); end
182
- def document?; end
183
- def initialize(range); end
184
- def inline?; end
185
- def inspect; end
186
- def loc; end
187
- def location; end
188
- def self.associate(ast, comments); end
189
- def self.associate_locations(ast, comments); end
190
- def text; end
191
- def type; end
192
- end
193
- class Parser::Source::Comment::Associator
194
- def advance_comment; end
195
- def advance_through_directives; end
196
- def associate; end
197
- def associate_and_advance_comment(node); end
198
- def associate_locations; end
199
- def current_comment_before?(node); end
200
- def current_comment_before_end?(node); end
201
- def current_comment_decorates?(node); end
202
- def do_associate; end
203
- def initialize(ast, comments); end
204
- def process_leading_comments(node); end
205
- def process_trailing_comments(node); end
206
- def skip_directives; end
207
- def skip_directives=(arg0); end
208
- def visit(node); end
209
- end
210
- class Parser::Source::Rewriter
211
- def active_clobber; end
212
- def active_clobber=(value); end
213
- def active_insertions; end
214
- def active_insertions=(value); end
215
- def active_queue; end
216
- def adjacent?(range1, range2); end
217
- def adjacent_insertion_mask(range); end
218
- def adjacent_insertions?(range); end
219
- def adjacent_position_mask(range); end
220
- def adjacent_updates?(range); end
221
- def append(action); end
222
- def can_merge?(action, existing); end
223
- def clobbered_insertion?(insertion); end
224
- def clobbered_position_mask(range); end
225
- def diagnostics; end
226
- def in_transaction?; end
227
- def initialize(source_buffer); end
228
- def insert_after(range, content); end
229
- def insert_after_multi(range, content); end
230
- def insert_before(range, content); end
231
- def insert_before_multi(range, content); end
232
- def merge_actions!(action, existing); end
233
- def merge_actions(action, existing); end
234
- def merge_replacements(actions); end
235
- def process; end
236
- def raise_clobber_error(action, existing); end
237
- def record_insertion(range); end
238
- def record_replace(range); end
239
- def remove(range); end
240
- def replace(range, content); end
241
- def replace_actions(old, updated); end
242
- def replace_compatible_with_insertion?(replace, insertion); end
243
- def source_buffer; end
244
- def transaction; end
245
- def wrap(range, before, after); end
246
- extend Parser::Deprecation
247
- end
248
- class Parser::Source::Rewriter::Action
249
- def <=>(other); end
250
- def allow_multiple_insertions; end
251
- def allow_multiple_insertions?; end
252
- def initialize(range, replacement = nil, allow_multiple_insertions = nil, order = nil); end
253
- def order; end
254
- def range; end
255
- def replacement; end
256
- def to_s; end
257
- include Comparable
258
- end
259
- class Parser::Source::TreeRewriter
260
- def check_policy_validity; end
261
- def check_range_validity(range); end
262
- def combine(range, attributes); end
263
- def diagnostics; end
264
- def enforce_policy(event); end
265
- def in_transaction?; end
266
- def initialize(source_buffer, crossing_deletions: nil, different_replacements: nil, swallowed_insertions: nil); end
267
- def insert_after(range, content); end
268
- def insert_after_multi(range, text); end
269
- def insert_before(range, content); end
270
- def insert_before_multi(range, text); end
271
- def process; end
272
- def remove(range); end
273
- def replace(range, content); end
274
- def source_buffer; end
275
- def transaction; end
276
- def trigger_policy(event, range: nil, conflict: nil, **arguments); end
277
- def wrap(range, insert_before, insert_after); end
278
- extend Parser::Deprecation
279
- end
280
- class Parser::Source::TreeRewriter::Action
281
- def call_enforcer_for_merge(action); end
282
- def combine(action); end
283
- def do_combine(action); end
284
- def fuse_deletions(action, fusible, other_sibblings); end
285
- def initialize(range, enforcer, insert_before: nil, replacement: nil, insert_after: nil, children: nil); end
286
- def insert_after; end
287
- def insert_before; end
288
- def insertion?; end
289
- def merge(action); end
290
- def ordered_replacements; end
291
- def place_in_hierachy(action); end
292
- def range; end
293
- def relationship_with(action); end
294
- def replacement; end
295
- def swallow(children); end
296
- def with(range: nil, children: nil, insert_before: nil, replacement: nil, insert_after: nil); end
297
- end
298
- class Parser::Source::Map
299
- def ==(other); end
300
- def column; end
301
- def expression; end
302
- def first_line; end
303
- def initialize(expression); end
304
- def initialize_copy(other); end
305
- def last_column; end
306
- def last_line; end
307
- def line; end
308
- def node; end
309
- def node=(node); end
310
- def to_hash; end
311
- def update_expression(expression_l); end
312
- def with(&block); end
313
- def with_expression(expression_l); end
314
- end
315
- class Parser::Source::Map::Operator < Parser::Source::Map
316
- def initialize(operator, expression); end
317
- def operator; end
318
- end
319
- class Parser::Source::Map::Collection < Parser::Source::Map
320
- def begin; end
321
- def end; end
322
- def initialize(begin_l, end_l, expression_l); end
323
- end
324
- class Parser::Source::Map::Constant < Parser::Source::Map
325
- def double_colon; end
326
- def initialize(double_colon, name, expression); end
327
- def name; end
328
- def operator; end
329
- def update_operator(operator_l); end
330
- def with_operator(operator_l); end
331
- end
332
- class Parser::Source::Map::Variable < Parser::Source::Map
333
- def initialize(name_l, expression_l = nil); end
334
- def name; end
335
- def operator; end
336
- def update_operator(operator_l); end
337
- def with_operator(operator_l); end
338
- end
339
- class Parser::Source::Map::Keyword < Parser::Source::Map
340
- def begin; end
341
- def end; end
342
- def initialize(keyword_l, begin_l, end_l, expression_l); end
343
- def keyword; end
344
- end
345
- class Parser::Source::Map::Definition < Parser::Source::Map
346
- def end; end
347
- def initialize(keyword_l, operator_l, name_l, end_l); end
348
- def keyword; end
349
- def name; end
350
- def operator; end
351
- end
352
- class Parser::Source::Map::Send < Parser::Source::Map
353
- def begin; end
354
- def dot; end
355
- def end; end
356
- def initialize(dot_l, selector_l, begin_l, end_l, expression_l); end
357
- def operator; end
358
- def selector; end
359
- def update_operator(operator_l); end
360
- def with_operator(operator_l); end
361
- end
362
- class Parser::Source::Map::Index < Parser::Source::Map
363
- def begin; end
364
- def end; end
365
- def initialize(begin_l, end_l, expression_l); end
366
- def operator; end
367
- def update_operator(operator_l); end
368
- def with_operator(operator_l); end
369
- end
370
- class Parser::Source::Map::Condition < Parser::Source::Map
371
- def begin; end
372
- def else; end
373
- def end; end
374
- def initialize(keyword_l, begin_l, else_l, end_l, expression_l); end
375
- def keyword; end
376
- end
377
- class Parser::Source::Map::Ternary < Parser::Source::Map
378
- def colon; end
379
- def initialize(question_l, colon_l, expression_l); end
380
- def question; end
381
- end
382
- class Parser::Source::Map::For < Parser::Source::Map
383
- def begin; end
384
- def end; end
385
- def in; end
386
- def initialize(keyword_l, in_l, begin_l, end_l, expression_l); end
387
- def keyword; end
388
- end
389
- class Parser::Source::Map::RescueBody < Parser::Source::Map
390
- def assoc; end
391
- def begin; end
392
- def initialize(keyword_l, assoc_l, begin_l, expression_l); end
393
- def keyword; end
394
- end
395
- class Parser::Source::Map::Heredoc < Parser::Source::Map
396
- def heredoc_body; end
397
- def heredoc_end; end
398
- def initialize(begin_l, body_l, end_l); end
399
- end
400
- class Parser::Source::Map::ObjcKwarg < Parser::Source::Map
401
- def argument; end
402
- def initialize(keyword_l, operator_l, argument_l, expression_l); end
403
- def keyword; end
404
- def operator; end
405
- end
406
- class Parser::SyntaxError < StandardError
407
- def diagnostic; end
408
- def initialize(diagnostic); end
409
- end
410
- class Parser::ClobberingError < RuntimeError
411
- end
412
- class Parser::Diagnostic
413
- def arguments; end
414
- def first_line_only(range); end
415
- def highlights; end
416
- def initialize(level, reason, arguments, location, highlights = nil); end
417
- def last_line_only(range); end
418
- def level; end
419
- def location; end
420
- def message; end
421
- def reason; end
422
- def render; end
423
- def render_line(range, ellipsis = nil, range_end = nil); end
424
- end
425
- class Parser::Diagnostic::Engine
426
- def all_errors_are_fatal; end
427
- def all_errors_are_fatal=(arg0); end
428
- def consumer; end
429
- def consumer=(arg0); end
430
- def ignore?(diagnostic); end
431
- def ignore_warnings; end
432
- def ignore_warnings=(arg0); end
433
- def initialize(consumer = nil); end
434
- def process(diagnostic); end
435
- def raise?(diagnostic); end
436
- end
437
- class Parser::StaticEnvironment
438
- def declare(name); end
439
- def declared?(name); end
440
- def extend_dynamic; end
441
- def extend_static; end
442
- def initialize; end
443
- def reset; end
444
- def unextend; end
445
- end
446
- class Parser::Lexer
447
- def advance; end
448
- def arg_or_cmdarg(cmd_state); end
449
- def cmdarg; end
450
- def cmdarg=(arg0); end
451
- def comments; end
452
- def comments=(arg0); end
453
- def cond; end
454
- def cond=(arg0); end
455
- def context; end
456
- def context=(arg0); end
457
- def dedent_level; end
458
- def diagnostic(type, reason, arguments = nil, location = nil, highlights = nil); end
459
- def diagnostics; end
460
- def diagnostics=(arg0); end
461
- def emit(type, value = nil, s = nil, e = nil); end
462
- def emit_comment(s = nil, e = nil); end
463
- def emit_do(do_block = nil); end
464
- def emit_table(table, s = nil, e = nil); end
465
- def encode_escape(ord); end
466
- def encoding; end
467
- def eof_codepoint?(point); end
468
- def force_utf32; end
469
- def force_utf32=(arg0); end
470
- def in_kwarg; end
471
- def in_kwarg=(arg0); end
472
- def initialize(version); end
473
- def literal; end
474
- def max_numparam; end
475
- def max_numparam_stack; end
476
- def next_state_for_literal(literal); end
477
- def pop_cmdarg; end
478
- def pop_cond; end
479
- def pop_literal; end
480
- def push_cmdarg; end
481
- def push_cond; end
482
- def push_literal(*args); end
483
- def range(s = nil, e = nil); end
484
- def reset(reset_state = nil); end
485
- def self._lex_eof_trans; end
486
- def self._lex_eof_trans=(arg0); end
487
- def self._lex_from_state_actions; end
488
- def self._lex_from_state_actions=(arg0); end
489
- def self._lex_index_offsets; end
490
- def self._lex_index_offsets=(arg0); end
491
- def self._lex_indicies; end
492
- def self._lex_indicies=(arg0); end
493
- def self._lex_key_spans; end
494
- def self._lex_key_spans=(arg0); end
495
- def self._lex_to_state_actions; end
496
- def self._lex_to_state_actions=(arg0); end
497
- def self._lex_trans_actions; end
498
- def self._lex_trans_actions=(arg0); end
499
- def self._lex_trans_keys; end
500
- def self._lex_trans_keys=(arg0); end
501
- def self._lex_trans_targs; end
502
- def self._lex_trans_targs=(arg0); end
503
- def self.lex_en_expr_arg; end
504
- def self.lex_en_expr_arg=(arg0); end
505
- def self.lex_en_expr_beg; end
506
- def self.lex_en_expr_beg=(arg0); end
507
- def self.lex_en_expr_cmdarg; end
508
- def self.lex_en_expr_cmdarg=(arg0); end
509
- def self.lex_en_expr_dot; end
510
- def self.lex_en_expr_dot=(arg0); end
511
- def self.lex_en_expr_end; end
512
- def self.lex_en_expr_end=(arg0); end
513
- def self.lex_en_expr_endarg; end
514
- def self.lex_en_expr_endarg=(arg0); end
515
- def self.lex_en_expr_endfn; end
516
- def self.lex_en_expr_endfn=(arg0); end
517
- def self.lex_en_expr_fname; end
518
- def self.lex_en_expr_fname=(arg0); end
519
- def self.lex_en_expr_labelarg; end
520
- def self.lex_en_expr_labelarg=(arg0); end
521
- def self.lex_en_expr_mid; end
522
- def self.lex_en_expr_mid=(arg0); end
523
- def self.lex_en_expr_value; end
524
- def self.lex_en_expr_value=(arg0); end
525
- def self.lex_en_expr_variable; end
526
- def self.lex_en_expr_variable=(arg0); end
527
- def self.lex_en_interp_backslash_delimited; end
528
- def self.lex_en_interp_backslash_delimited=(arg0); end
529
- def self.lex_en_interp_backslash_delimited_words; end
530
- def self.lex_en_interp_backslash_delimited_words=(arg0); end
531
- def self.lex_en_interp_string; end
532
- def self.lex_en_interp_string=(arg0); end
533
- def self.lex_en_interp_words; end
534
- def self.lex_en_interp_words=(arg0); end
535
- def self.lex_en_leading_dot; end
536
- def self.lex_en_leading_dot=(arg0); end
537
- def self.lex_en_line_begin; end
538
- def self.lex_en_line_begin=(arg0); end
539
- def self.lex_en_line_comment; end
540
- def self.lex_en_line_comment=(arg0); end
541
- def self.lex_en_plain_backslash_delimited; end
542
- def self.lex_en_plain_backslash_delimited=(arg0); end
543
- def self.lex_en_plain_backslash_delimited_words; end
544
- def self.lex_en_plain_backslash_delimited_words=(arg0); end
545
- def self.lex_en_plain_string; end
546
- def self.lex_en_plain_string=(arg0); end
547
- def self.lex_en_plain_words; end
548
- def self.lex_en_plain_words=(arg0); end
549
- def self.lex_en_regexp_modifiers; end
550
- def self.lex_en_regexp_modifiers=(arg0); end
551
- def self.lex_error; end
552
- def self.lex_error=(arg0); end
553
- def self.lex_start; end
554
- def self.lex_start=(arg0); end
555
- def source_buffer; end
556
- def source_buffer=(source_buffer); end
557
- def stack_pop; end
558
- def state; end
559
- def state=(state); end
560
- def static_env; end
561
- def static_env=(arg0); end
562
- def tok(s = nil, e = nil); end
563
- def tokens; end
564
- def tokens=(arg0); end
565
- def version?(*versions); end
566
- end
567
- class Parser::Lexer::Literal
568
- def backslash_delimited?; end
569
- def clear_buffer; end
570
- def coerce_encoding(string); end
571
- def dedent_level; end
572
- def delimiter?(delimiter); end
573
- def emit(token, type, s, e); end
574
- def emit_start_tok; end
575
- def end_interp_brace_and_try_closing; end
576
- def extend_content; end
577
- def extend_space(ts, te); end
578
- def extend_string(string, ts, te); end
579
- def flush_string; end
580
- def heredoc?; end
581
- def heredoc_e; end
582
- def infer_indent_level(line); end
583
- def initialize(lexer, str_type, delimiter, str_s, heredoc_e = nil, indent = nil, dedent_body = nil, label_allowed = nil); end
584
- def interpolate?; end
585
- def munge_escape?(character); end
586
- def nest_and_try_closing(delimiter, ts, te, lookahead = nil); end
587
- def plain_heredoc?; end
588
- def regexp?; end
589
- def saved_herebody_s; end
590
- def saved_herebody_s=(arg0); end
591
- def squiggly_heredoc?; end
592
- def start_interp_brace; end
593
- def str_s; end
594
- def supports_line_continuation_via_slash?; end
595
- def type; end
596
- def words?; end
597
- end
598
- class Parser::Lexer::StackState
599
- def active?; end
600
- def clear; end
601
- def empty?; end
602
- def initialize(name); end
603
- def inspect; end
604
- def lexpop; end
605
- def pop; end
606
- def push(bit); end
607
- def to_s; end
608
- end
609
- class Parser::Lexer::Dedenter
610
- def dedent(string); end
611
- def initialize(dedent_level); end
612
- def interrupt; end
613
- end
614
- class Parser::Lexer::MaxNumparamStack
615
- def can_have_numparams?; end
616
- def cant_have_numparams!; end
617
- def initialize; end
618
- def pop; end
619
- def push; end
620
- def register(numparam); end
621
- def set(value); end
622
- def top; end
623
- end
624
- class Parser::Builders::Default
625
- def __ENCODING__(__ENCODING__t); end
626
- def __FILE__(__FILE__t); end
627
- def __LINE__(__LINE__t); end
628
- def accessible(node); end
629
- def alias(alias_t, to, from); end
630
- def arg(name_t); end
631
- def arg_expr(expr); end
632
- def arg_name_collides?(this_name, that_name); end
633
- def arg_prefix_map(op_t, name_t = nil); end
634
- def args(begin_t, args, end_t, check_args = nil); end
635
- def array(begin_t, elements, end_t); end
636
- def assign(lhs, eql_t, rhs); end
637
- def assignable(node); end
638
- def associate(begin_t, pairs, end_t); end
639
- def attr_asgn(receiver, dot_t, selector_t); end
640
- def back_ref(token); end
641
- def begin(begin_t, body, end_t); end
642
- def begin_body(compound_stmt, rescue_bodies = nil, else_t = nil, else_ = nil, ensure_t = nil, ensure_ = nil); end
643
- def begin_keyword(begin_t, body, end_t); end
644
- def binary_op(receiver, operator_t, arg); end
645
- def binary_op_map(left_e, op_t, right_e); end
646
- def block(method_call, begin_t, args, body, end_t); end
647
- def block_map(receiver_l, begin_t, end_t); end
648
- def block_pass(amper_t, arg); end
649
- def blockarg(amper_t, name_t); end
650
- def blockarg_expr(amper_t, expr); end
651
- def call_lambda(lambda_t); end
652
- def call_method(receiver, dot_t, selector_t, lparen_t = nil, args = nil, rparen_t = nil); end
653
- def call_type_for_dot(dot_t); end
654
- def case(case_t, expr, when_bodies, else_t, else_body, end_t); end
655
- def character(char_t); end
656
- def check_condition(cond); end
657
- def check_duplicate_arg(this_arg, map = nil); end
658
- def check_duplicate_args(args, map = nil); end
659
- def collapse_string_parts?(parts); end
660
- def collection_map(begin_t, parts, end_t); end
661
- def complex(complex_t); end
662
- def compstmt(statements); end
663
- def condition(cond_t, cond, then_t, if_true, else_t, if_false, end_t); end
664
- def condition_map(keyword_t, cond_e, begin_t, body_e, else_t, else_e, end_t); end
665
- def condition_mod(if_true, if_false, cond_t, cond); end
666
- def const(name_t); end
667
- def const_fetch(scope, t_colon2, name_t); end
668
- def const_global(t_colon3, name_t); end
669
- def const_op_assignable(node); end
670
- def constant_map(scope, colon2_t, name_t); end
671
- def cvar(token); end
672
- def dedent_string(node, dedent_level); end
673
- def def_class(class_t, name, lt_t, superclass, body, end_t); end
674
- def def_method(def_t, name_t, args, body, end_t); end
675
- def def_module(module_t, name, body, end_t); end
676
- def def_sclass(class_t, lshft_t, expr, body, end_t); end
677
- def def_singleton(def_t, definee, dot_t, name_t, args, body, end_t); end
678
- def definition_map(keyword_t, operator_t, name_t, end_t); end
679
- def delimited_string_map(string_t); end
680
- def diagnostic(type, reason, arguments, location, highlights = nil); end
681
- def eh_keyword_map(compstmt_e, keyword_t, body_es, else_t, else_e); end
682
- def emit_file_line_as_literals; end
683
- def emit_file_line_as_literals=(arg0); end
684
- def expr_map(loc); end
685
- def false(false_t); end
686
- def float(float_t); end
687
- def for(for_t, iterator, in_t, iteratee, do_t, body, end_t); end
688
- def for_map(keyword_t, in_t, begin_t, end_t); end
689
- def gvar(token); end
690
- def ident(token); end
691
- def index(receiver, lbrack_t, indexes, rbrack_t); end
692
- def index_asgn(receiver, lbrack_t, indexes, rbrack_t); end
693
- def index_map(receiver_e, lbrack_t, rbrack_t); end
694
- def initialize; end
695
- def integer(integer_t); end
696
- def ivar(token); end
697
- def join_exprs(left_expr, right_expr); end
698
- def keyword_cmd(type, keyword_t, lparen_t = nil, args = nil, rparen_t = nil); end
699
- def keyword_map(keyword_t, begin_t, args, end_t); end
700
- def keyword_mod_map(pre_e, keyword_t, post_e); end
701
- def kwarg(name_t); end
702
- def kwarg_map(name_t, value_e = nil); end
703
- def kwnilarg(dstar_t, nil_t); end
704
- def kwoptarg(name_t, value); end
705
- def kwrestarg(dstar_t, name_t = nil); end
706
- def kwsplat(dstar_t, arg); end
707
- def loc(token); end
708
- def logical_op(type, lhs, op_t, rhs); end
709
- def loop(type, keyword_t, cond, do_t, body, end_t); end
710
- def loop_mod(type, body, keyword_t, cond); end
711
- def match_op(receiver, match_t, arg); end
712
- def method_ref(receiver, dot_t, selector_t); end
713
- def module_definition_map(keyword_t, name_e, operator_t, end_t); end
714
- def multi_assign(lhs, eql_t, rhs); end
715
- def multi_lhs(begin_t, items, end_t); end
716
- def n(type, children, source_map); end
717
- def n0(type, source_map); end
718
- def nil(nil_t); end
719
- def not_op(not_t, begin_t = nil, receiver = nil, end_t = nil); end
720
- def nth_ref(token); end
721
- def numargs(max_numparam); end
722
- def numeric(kind, token); end
723
- def numparam(token); end
724
- def objc_kwarg(kwname_t, assoc_t, name_t); end
725
- def objc_restarg(star_t, name = nil); end
726
- def objc_varargs(pair, rest_of_varargs); end
727
- def op_assign(lhs, op_t, rhs); end
728
- def optarg(name_t, eql_t, value); end
729
- def pair(key, assoc_t, value); end
730
- def pair_keyword(key_t, value); end
731
- def pair_keyword_map(key_t, value_e); end
732
- def pair_list_18(list); end
733
- def pair_quoted(begin_t, parts, end_t, value); end
734
- def pair_quoted_map(begin_t, end_t, value_e); end
735
- def parser; end
736
- def parser=(arg0); end
737
- def postexe(postexe_t, lbrace_t, compstmt, rbrace_t); end
738
- def preexe(preexe_t, lbrace_t, compstmt, rbrace_t); end
739
- def prefix_string_map(symbol); end
740
- def procarg0(arg); end
741
- def range_exclusive(lhs, dot3_t, rhs); end
742
- def range_inclusive(lhs, dot2_t, rhs); end
743
- def range_map(start_e, op_t, end_e); end
744
- def rational(rational_t); end
745
- def regexp_compose(begin_t, parts, end_t, options); end
746
- def regexp_map(begin_t, end_t, options_e); end
747
- def regexp_options(regopt_t); end
748
- def rescue_body(rescue_t, exc_list, assoc_t, exc_var, then_t, compound_stmt); end
749
- def rescue_body_map(keyword_t, exc_list_e, assoc_t, exc_var_e, then_t, compstmt_e); end
750
- def restarg(star_t, name_t = nil); end
751
- def restarg_expr(star_t, expr = nil); end
752
- def self(token); end
753
- def self.emit_arg_inside_procarg0; end
754
- def self.emit_arg_inside_procarg0=(arg0); end
755
- def self.emit_encoding; end
756
- def self.emit_encoding=(arg0); end
757
- def self.emit_index; end
758
- def self.emit_index=(arg0); end
759
- def self.emit_lambda; end
760
- def self.emit_lambda=(arg0); end
761
- def self.emit_procarg0; end
762
- def self.emit_procarg0=(arg0); end
763
- def self.modernize; end
764
- def send_binary_op_map(lhs_e, selector_t, rhs_e); end
765
- def send_index_map(receiver_e, lbrack_t, rbrack_t); end
766
- def send_map(receiver_e, dot_t, selector_t, begin_t = nil, args = nil, end_t = nil); end
767
- def send_unary_op_map(selector_t, arg_e); end
768
- def shadowarg(name_t); end
769
- def splat(star_t, arg = nil); end
770
- def static_regexp(parts, options); end
771
- def static_regexp_node(node); end
772
- def static_string(nodes); end
773
- def string(string_t); end
774
- def string_compose(begin_t, parts, end_t); end
775
- def string_internal(string_t); end
776
- def string_map(begin_t, parts, end_t); end
777
- def string_value(token); end
778
- def symbol(symbol_t); end
779
- def symbol_compose(begin_t, parts, end_t); end
780
- def symbol_internal(symbol_t); end
781
- def symbols_compose(begin_t, parts, end_t); end
782
- def ternary(cond, question_t, if_true, colon_t, if_false); end
783
- def ternary_map(begin_e, question_t, mid_e, colon_t, end_e); end
784
- def token_map(token); end
785
- def true(true_t); end
786
- def unary_num(unary_t, numeric); end
787
- def unary_op(op_t, receiver); end
788
- def unary_op_map(op_t, arg_e = nil); end
789
- def undef_method(undef_t, names); end
790
- def unquoted_map(token); end
791
- def value(token); end
792
- def var_send_map(variable_e); end
793
- def variable_map(name_t); end
794
- def when(when_t, patterns, then_t, body); end
795
- def word(parts); end
796
- def words_compose(begin_t, parts, end_t); end
797
- def xstring_compose(begin_t, parts, end_t); end
798
- end
799
- class Parser::Context
800
- def class_definition_allowed?; end
801
- def dynamic_const_definition_allowed?; end
802
- def in_block?; end
803
- def in_class?; end
804
- def in_lambda?; end
805
- def indirectly_in_def?; end
806
- def initialize; end
807
- def module_definition_allowed?; end
808
- def pop; end
809
- def push(state); end
810
- def reset; end
811
- def stack; end
812
- end
813
- class Parser::Base < Racc::Parser
814
- def builder; end
815
- def check_kwarg_name(name_t); end
816
- def context; end
817
- def diagnostic(level, reason, arguments, location_t, highlights_ts = nil); end
818
- def diagnostics; end
819
- def initialize(builder = nil); end
820
- def next_token; end
821
- def on_error(error_token_id, error_value, value_stack); end
822
- def parse(source_buffer); end
823
- def parse_with_comments(source_buffer); end
824
- def reset; end
825
- def self.default_parser; end
826
- def self.parse(string, file = nil, line = nil); end
827
- def self.parse_file(filename); end
828
- def self.parse_file_with_comments(filename); end
829
- def self.parse_with_comments(string, file = nil, line = nil); end
830
- def self.setup_source_buffer(file, line, string, encoding); end
831
- def source_buffer; end
832
- def static_env; end
833
- def tokenize(source_buffer, recover = nil); end
834
- end
835
- class Parser::Rewriter < Parser::AST::Processor
836
- def assignment?(node); end
837
- def initialize(*arg0); end
838
- def insert_after(range, content); end
839
- def insert_before(range, content); end
840
- def remove(range); end
841
- def replace(range, content); end
842
- def rewrite(source_buffer, ast); end
843
- def wrap(range, before, after); end
844
- extend Parser::Deprecation
845
- end
846
- class Parser::TreeRewriter < Parser::AST::Processor
847
- def assignment?(node); end
848
- def insert_after(range, content); end
849
- def insert_before(range, content); end
850
- def remove(range); end
851
- def replace(range, content); end
852
- def rewrite(source_buffer, ast, **policy); end
853
- def wrap(range, before, after); end
854
- end
855
- module Parser::Builders
856
- end