ruby-merge 7.0.0 → 7.1.1

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.
@@ -0,0 +1,97 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Ruby
4
+ module Merge
5
+ module SignatureSupport
6
+ module_function
7
+
8
+ def method_definition(name, params)
9
+ [:def, name, Array(params)]
10
+ end
11
+
12
+ def class_definition(constant_path)
13
+ [:class, constant_path]
14
+ end
15
+
16
+ def module_definition(constant_path)
17
+ [:module, constant_path]
18
+ end
19
+
20
+ def singleton_class(expression)
21
+ [:singleton_class, expression]
22
+ end
23
+
24
+ def constant(name)
25
+ [:const, name]
26
+ end
27
+
28
+ def variable_assignment(kind, name)
29
+ [kind, name]
30
+ end
31
+
32
+ def multi_write(targets)
33
+ [:multi_write, Array(targets)]
34
+ end
35
+
36
+ def conditional(kind, predicate)
37
+ [kind, predicate]
38
+ end
39
+
40
+ def case_statement(predicate)
41
+ [:case, predicate || '']
42
+ end
43
+
44
+ def case_match_statement(predicate)
45
+ [:case_match, predicate || '']
46
+ end
47
+
48
+ def loop_statement(kind, *parts)
49
+ [kind, *parts]
50
+ end
51
+
52
+ def begin_block(first_statement_preview)
53
+ [:begin, first_statement_preview || '']
54
+ end
55
+
56
+ def call(method_name, identifier, block: false)
57
+ [block ? :call_with_block : :call, method_name, identifier]
58
+ end
59
+
60
+ def super_call(block:)
61
+ [:super, block ? :with_block : :no_block]
62
+ end
63
+
64
+ def forwarding_super_call(block:)
65
+ [:forwarding_super, block ? :with_block : :no_block]
66
+ end
67
+
68
+ def call_operator_write(write_name, receiver)
69
+ [:call_op_write, write_name, receiver]
70
+ end
71
+
72
+ def lambda_literal(parameters_source)
73
+ [:lambda, parameters_source || '']
74
+ end
75
+
76
+ def execution_block(kind, line_number)
77
+ [kind, line_number]
78
+ end
79
+
80
+ def parenthesized(first_expression_preview)
81
+ [:parens, first_expression_preview || '']
82
+ end
83
+
84
+ def embedded(statements_source)
85
+ [:embedded, statements_source || '']
86
+ end
87
+
88
+ def other(class_name, line_number)
89
+ [:other, class_name, line_number]
90
+ end
91
+
92
+ def textual_method_signature(receiver_prefix, method_name)
93
+ "#{receiver_prefix}#{method_name}"
94
+ end
95
+ end
96
+ end
97
+ end
@@ -2,10 +2,12 @@
2
2
 
3
3
  module Ruby
4
4
  module Merge
5
+ # Version namespace for this gem.
5
6
  module Version
6
- VERSION = "7.0.0"
7
+ # Current gem version.
8
+ VERSION = '7.1.1'
7
9
  end
8
-
9
- VERSION = Version::VERSION
10
+ # Current gem version exposed at the traditional constant location.
11
+ VERSION = Version::VERSION # Traditional Constant Location
10
12
  end
11
13
  end