nrser 0.3.9 → 0.3.10

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 (141) hide show
  1. checksums.yaml +4 -4
  2. data/lib/nrser/char/alpha_numeric_sub.rb +9 -19
  3. data/lib/nrser/char/special.rb +5 -5
  4. data/lib/nrser/core_ext/array.rb +36 -13
  5. data/lib/nrser/core_ext/enumerable.rb +1 -0
  6. data/lib/nrser/core_ext/enumerable/find_map.rb +1 -1
  7. data/lib/nrser/core_ext/hash/bury.rb +3 -0
  8. data/lib/nrser/core_ext/hash/extract_values_at.rb +2 -2
  9. data/lib/nrser/core_ext/method/full_name.rb +1 -1
  10. data/lib/nrser/core_ext/module/method_objects.rb +1 -1
  11. data/lib/nrser/core_ext/module/source_locations.rb +27 -15
  12. data/lib/nrser/core_ext/object/lazy_var.rb +1 -1
  13. data/lib/nrser/core_ext/pathname.rb +67 -12
  14. data/lib/nrser/core_ext/pathname/subpath.rb +86 -0
  15. data/lib/nrser/core_ext/string.rb +28 -1
  16. data/lib/nrser/core_ext/symbol.rb +11 -12
  17. data/lib/nrser/errors/README.md +154 -0
  18. data/lib/nrser/errors/attr_error.rb +146 -53
  19. data/lib/nrser/errors/count_error.rb +61 -12
  20. data/lib/nrser/errors/nicer_error.rb +42 -71
  21. data/lib/nrser/errors/value_error.rb +53 -58
  22. data/lib/nrser/functions.rb +0 -2
  23. data/lib/nrser/functions/enumerable.rb +5 -17
  24. data/lib/nrser/functions/enumerable/associate.rb +14 -5
  25. data/lib/nrser/functions/enumerable/find_all_map.rb +1 -1
  26. data/lib/nrser/functions/enumerable/include_slice/array_include_slice.rb +1 -1
  27. data/lib/nrser/functions/hash/bury.rb +2 -12
  28. data/lib/nrser/functions/merge_by.rb +2 -2
  29. data/lib/nrser/functions/module/method_objects.rb +2 -2
  30. data/lib/nrser/functions/path.rb +185 -165
  31. data/lib/nrser/functions/path/normalized.rb +84 -0
  32. data/lib/nrser/functions/string.rb +4 -4
  33. data/lib/nrser/functions/text/README.md +4 -0
  34. data/lib/nrser/functions/text/format.rb +53 -0
  35. data/lib/nrser/functions/text/indentation.rb +6 -6
  36. data/lib/nrser/functions/text/word_wrap.rb +2 -2
  37. data/lib/nrser/functions/tree/map_leaves.rb +3 -3
  38. data/lib/nrser/functions/tree/map_tree.rb +2 -2
  39. data/lib/nrser/functions/tree/transform.rb +1 -18
  40. data/lib/nrser/gem_ext/README.md +4 -0
  41. data/lib/nrser/labs/README.md +8 -0
  42. data/lib/nrser/labs/config.rb +163 -0
  43. data/lib/nrser/labs/i8.rb +49 -159
  44. data/lib/nrser/labs/i8/struct.rb +167 -0
  45. data/lib/nrser/labs/i8/struct/hash.rb +140 -0
  46. data/lib/nrser/labs/i8/struct/vector.rb +149 -0
  47. data/lib/nrser/labs/i8/surjection.rb +211 -0
  48. data/lib/nrser/labs/lots/consumer.rb +19 -0
  49. data/lib/nrser/labs/lots/parser.rb +21 -1
  50. data/lib/nrser/labs/stash.rb +4 -4
  51. data/lib/nrser/log.rb +25 -21
  52. data/lib/nrser/log/appender/sync.rb +15 -11
  53. data/lib/nrser/log/formatters/color.rb +0 -3
  54. data/lib/nrser/log/formatters/mixin.rb +4 -4
  55. data/lib/nrser/log/logger.rb +54 -6
  56. data/lib/nrser/log/mixin.rb +2 -1
  57. data/lib/nrser/log/plugin.rb +6 -6
  58. data/lib/nrser/log/types.rb +46 -29
  59. data/lib/nrser/mean_streak.rb +0 -8
  60. data/lib/nrser/mean_streak/document.rb +1 -4
  61. data/lib/nrser/message.rb +3 -3
  62. data/lib/nrser/meta/README.md +4 -0
  63. data/lib/nrser/meta/lazy_attr.rb +2 -2
  64. data/lib/nrser/meta/source/location.rb +1 -1
  65. data/lib/nrser/props.rb +34 -3
  66. data/lib/nrser/props/class_methods.rb +2 -1
  67. data/lib/nrser/props/instance_methods.rb +9 -9
  68. data/lib/nrser/props/metadata.rb +4 -12
  69. data/lib/nrser/props/mutable/stash.rb +5 -2
  70. data/lib/nrser/props/prop.rb +10 -19
  71. data/lib/nrser/rspex.rb +1 -20
  72. data/lib/nrser/rspex/example_group/describe_attribute.rb +3 -0
  73. data/lib/nrser/rspex/example_group/describe_called_with.rb +9 -4
  74. data/lib/nrser/rspex/example_group/describe_case.rb +1 -0
  75. data/lib/nrser/rspex/example_group/describe_class.rb +2 -0
  76. data/lib/nrser/rspex/example_group/describe_group.rb +1 -1
  77. data/lib/nrser/rspex/example_group/describe_instance.rb +3 -1
  78. data/lib/nrser/rspex/example_group/describe_message.rb +1 -1
  79. data/lib/nrser/rspex/example_group/describe_method.rb +64 -30
  80. data/lib/nrser/rspex/example_group/describe_response_to.rb +1 -1
  81. data/lib/nrser/rspex/example_group/describe_section.rb +4 -1
  82. data/lib/nrser/rspex/example_group/describe_sent_to.rb +1 -1
  83. data/lib/nrser/rspex/example_group/describe_setup.rb +1 -0
  84. data/lib/nrser/rspex/example_group/describe_source_file.rb +1 -1
  85. data/lib/nrser/rspex/example_group/describe_spec_file.rb +4 -2
  86. data/lib/nrser/rspex/example_group/describe_when.rb +2 -1
  87. data/lib/nrser/rspex/example_group/describe_x.rb +5 -5
  88. data/lib/nrser/rspex/format.rb +0 -15
  89. data/lib/nrser/sugar/method_missing_forwarder.rb +3 -3
  90. data/lib/nrser/sys/env/path.rb +2 -28
  91. data/lib/nrser/types.rb +63 -12
  92. data/lib/nrser/types/README.md +76 -0
  93. data/lib/nrser/types/arrays.rb +192 -137
  94. data/lib/nrser/types/attributes.rb +269 -0
  95. data/lib/nrser/types/booleans.rb +134 -83
  96. data/lib/nrser/types/bounded.rb +110 -47
  97. data/lib/nrser/types/collections.rb +119 -0
  98. data/lib/nrser/types/combinators.rb +283 -196
  99. data/lib/nrser/types/doc/display_table.md +66 -0
  100. data/lib/nrser/types/eqiuvalent.rb +91 -0
  101. data/lib/nrser/types/errors/check_error.rb +5 -11
  102. data/lib/nrser/types/errors/from_string_error.rb +3 -3
  103. data/lib/nrser/types/factory.rb +287 -20
  104. data/lib/nrser/types/hashes.rb +227 -179
  105. data/lib/nrser/types/in.rb +73 -36
  106. data/lib/nrser/types/is.rb +67 -60
  107. data/lib/nrser/types/is_a.rb +141 -84
  108. data/lib/nrser/types/labels.rb +45 -16
  109. data/lib/nrser/types/maybe.rb +6 -3
  110. data/lib/nrser/types/nil.rb +64 -27
  111. data/lib/nrser/types/not.rb +92 -34
  112. data/lib/nrser/types/numbers.rb +224 -169
  113. data/lib/nrser/types/pairs.rb +113 -89
  114. data/lib/nrser/types/paths.rb +250 -137
  115. data/lib/nrser/types/responds.rb +167 -89
  116. data/lib/nrser/types/selector.rb +234 -0
  117. data/lib/nrser/types/shape.rb +136 -65
  118. data/lib/nrser/types/strings.rb +189 -63
  119. data/lib/nrser/types/symbols.rb +83 -33
  120. data/lib/nrser/types/top.rb +89 -0
  121. data/lib/nrser/types/tuples.rb +134 -98
  122. data/lib/nrser/types/type.rb +617 -505
  123. data/lib/nrser/types/when.rb +123 -98
  124. data/lib/nrser/types/where.rb +182 -91
  125. data/lib/nrser/version.rb +1 -1
  126. data/spec/lib/nrser/core_ext/pathname/subpath_spec.rb +22 -0
  127. data/spec/lib/nrser/errors/attr_error_spec.rb +68 -0
  128. data/spec/lib/nrser/errors/count_error_spec.rb +69 -0
  129. data/spec/lib/nrser/functions/path/normalize_path_spec.rb +35 -0
  130. data/spec/lib/nrser/functions/tree/map_tree_spec.rb +74 -96
  131. data/spec/lib/nrser/functions/tree/transform_spec.rb +11 -11
  132. data/spec/lib/nrser/labs/config_spec.rb +22 -0
  133. data/spec/lib/nrser/labs/i8/struct_spec.rb +39 -0
  134. data/spec/lib/nrser/types/display_spec.rb +50 -0
  135. data/spec/lib/nrser/types/paths_spec.rb +16 -10
  136. data/spec/lib/nrser/types/selector_spec.rb +125 -0
  137. data/spec/spec_helper.rb +4 -5
  138. metadata +105 -22
  139. data/lib/nrser/types/any.rb +0 -41
  140. data/lib/nrser/types/attrs.rb +0 -213
  141. data/lib/nrser/types/trees.rb +0 -42
@@ -19,67 +19,8 @@ require 'nrser/core_ext/object/lazy_var'
19
19
 
20
20
  # A mixin for {Exception} and utilities to make life better... even when things
21
21
  # go wrong.
22
- #
23
- # "Nicer" errors do a few things:
24
- #
25
- # 1. **`message` is a splat/`Array`**
26
- #
27
- # Accept an {Array} `message` instead of just a string, dumping non-string
28
- # values and joining everything together.
29
- #
30
- # This lets you deal with printing/dumping all in one place instead of
31
- # ad-hoc'ing `#to_s`, `#inspect`, `#pretty_inspect`, etc. all over the
32
- # place (though you can still dump values yourself of course since string
33
- # pass right through).
34
- #
35
- # Write things like:
36
- #
37
- # MyError.new "The value", value, "sucks, it should be", expected
38
- #
39
- # This should cut down the amount of typing when raising as well, which
40
- # is always welcome.
41
- #
42
- # It also allows for a future where we get smarter about dumping things,
43
- # offer configuration options, switch on environments (slow, rich dev
44
- # versus fast, concise prod), etc.
45
- #
46
- # 2. **"Extended" Messages**
47
- #
48
- # The normal message that we talked about in (1) - that we call the
49
- # *summary message* or *super-message* (since it gets passed up to the
50
- # built-in Exception's `#initialize`) - is intended to be:
51
- #
52
- # 1. Very concise
53
- # - A single line well under 80 characters if possible.
54
- #
55
- # - This just seems like how Ruby exception messages were meant to
56
- # be, I guess, and in many situations it's all you would want or
57
- # need (production, when it just gets rescued anyways,
58
- # there's no one there to read it, etc.).
59
- #
60
- # 2. Cheap to render.
61
- # - We may be trying to do lot very quickly on a production system.
62
- #
63
- # However - especially when developing - it can be really nice to add
64
- # considerably more detail and feedback to errors.
65
- #
66
- # To support this important use case as well, `NicerError` introduces the
67
- # idea of an *extended message* that does not need to be rendered and
68
- # output along with the *summary/super-message*.
69
- #
70
- # It's rendering is done on-demand, so systems that are not configured to
71
- # use it will pay a minimal cost for it's existence.
72
- #
73
- # > See {#extended_message}.
74
- #
75
- # The extended message is composed of:
76
- #
77
- # 1. Text *details*, optionally rendered via {Binding.erb} when a
78
- # binding is provided.
79
- #
80
- # 2. A *context* of name and value pairs to dump.
81
- #
82
- # Both are provided as optional keyword parameters to {#initialize}.
22
+ #
23
+ # Check the docs at the {file:lib/nrser/errors/README.md nrser/errors README}.
83
24
  #
84
25
  module NRSER::NicerError
85
26
 
@@ -104,18 +45,44 @@ module NRSER::NicerError
104
45
  def self.column_width
105
46
  DEFAULT_COLUMN_WIDTH
106
47
  end
48
+
49
+
50
+ module ClassMethods
51
+ def def_context_delegator keys:, presence_predicate: true
52
+ keys = Array keys
53
+
54
+ keys.each do |key|
55
+ define_method key do
56
+ if (found_key = keys.find { |k| context.key? k })
57
+ context[found_key]
58
+ end
59
+ end
60
+
61
+ if presence_predicate
62
+ define_method "#{ key }?" do
63
+ !!keys.find { |k| context.key? k }
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
69
+
70
+ def self.included base
71
+ base.extend ClassMethods
72
+ end
107
73
 
108
74
 
109
75
  # Construct a nicer error.
110
76
  #
111
- # @param [Array] *message
112
- # Main message segments.
77
+ # @param [Array] message
78
+ # Main message segments. See {#format_message} and {#format_message_segment}
79
+ # for an understanding of how they are, well, formatted.
113
80
  #
114
- # @param [Binding?] binding:
81
+ # @param [Binding?] binding
115
82
  # When provided any details string will be rendered using it's
116
83
  # {Binding#erb} method.
117
84
  #
118
- # @param [nil | String | Proc<()=>String> | #to_s] details:
85
+ # @param [nil | String | Proc<()=>String> | #to_s] details
119
86
  # Additional text details to add to the extended message. When:
120
87
  #
121
88
  # 1. `nil` - no details will be added.
@@ -131,16 +98,16 @@ module NRSER::NicerError
131
98
  # `#to_s` will be called on the value and the result will be used
132
99
  # as in (2).
133
100
  #
134
- # @param [Hash<Symbol, VALUE>] **context
101
+ # @param [Hash<Symbol, VALUE>] context
135
102
  # Any additional names and values to dump with an extended message.
136
103
  #
137
104
  def initialize *message,
138
105
  binding: nil,
139
106
  details: nil,
140
107
  **context
141
- @binding = binding
142
- @context = context
143
- @details = details
108
+ @binding = binding.freeze
109
+ @context = context.freeze
110
+ @details = details.freeze
144
111
 
145
112
  message = default_message if message.empty?
146
113
  super_message = format_message *message
@@ -159,6 +126,10 @@ module NRSER::NicerError
159
126
  # @return [String]
160
127
  # The formatted string for the segment.
161
128
  #
129
+ # @todo
130
+ # This should talk to config when that comes about to find out how to
131
+ # dump things.
132
+ #
162
133
  def format_message_segment segment
163
134
  return segment.to_summary if segment.respond_to?( :to_summary )
164
135
 
@@ -171,7 +142,7 @@ module NRSER::NicerError
171
142
 
172
143
  # Format the main message by converting args to strings and joining them.
173
144
  #
174
- # @param [Array] *message
145
+ # @param [Array] message
175
146
  # Message segments.
176
147
  #
177
148
  # @return [String]
@@ -306,7 +277,7 @@ module NRSER::NicerError
306
277
  # {Exception#message} just forwards here, so I overrode that with
307
278
  # {#message} to just get the *summary/super-message* from this method.
308
279
  #
309
- # @param [Boolean?] extended:
280
+ # @param [Boolean?] extended
310
281
  # Flag to explicitly control summary/super or extended message:
311
282
  #
312
283
  # 1. `nil` - call {#add_extended_message?} to decide (default).
@@ -1,5 +1,21 @@
1
1
  # frozen_string_literal: true
2
+ # encoding: UTF-8
2
3
 
4
+ # Requirements
5
+ # ========================================================================
6
+
7
+ # Make nice(r)
8
+ require_relative './nicer_error'
9
+
10
+
11
+ # Namespace
12
+ # ========================================================================
13
+
14
+ module NRSER
15
+
16
+
17
+ # Definitions
18
+ # ========================================================================
3
19
 
4
20
  # Raised when there is a problem with a *value* that does not fall into one
5
21
  # of the other built-in exception categories (non-exhaustive list):
@@ -7,66 +23,45 @@
7
23
  # 1. It's the wrong type (TypeError)
8
24
  # 2. It's an argument (ArgumentError)
9
25
  #
10
- # The invalid value is attached to the error as an instance value so that
11
- # rescuers up the stack can do more intelligent things with it if need be.
26
+ # It is encouraged to attach the invalid value as the `value:` keyword argument,
27
+ # which is then stored in {#context} hash and can be accessed via {#value}.
12
28
  #
13
29
  class NRSER::ValueError < StandardError
30
+
31
+ # Play nice :)
32
+ include NicerError
14
33
 
15
- # The invalid value.
16
- #
17
- # @return [Object]
18
- #
19
- attr_reader :subject
20
-
21
-
22
- def initialize message = nil, subject:
23
- @subject = subject
24
-
25
- # If we received `nil` for the message, call {#build_message} to get it.
26
- #
27
- # This provides a "hook" to assemble the message at the last possible
28
- # moment before it needs to go up to {StandardError#initialize}, allowing
29
- # {#build_message} to work with an otherwise fully-initialized instance.
30
- #
31
- # Of course, {NRSER::ValueError#build_message}
32
- # throws {NotImplementedError} since it doesn't really have enough
33
- # knowledge to build anything useful (we're going for useful errors,
34
- # "Value #{ value } is invalid" does not suffice).
35
- #
36
- message = build_message if message.nil?
37
-
38
- super message
39
- end
40
-
41
-
42
- # Build the error message when none is provided to `#initialize`.
34
+ # @!method value?
35
+ # `true` if we have a `:value` key in the {#context}.
36
+ #
37
+ # @return [Boolean]
38
+ #
39
+ # @!method value
40
+ # Get the value at the `:value` key in {#context}.
41
+ #
42
+ # @return [Object]
43
43
  #
44
- # When no `message` (or `nil`) is provided to {NRSER::ValueError.initialize}
45
- # it will call this method to get the error message just before it needs it
46
- # to call up to {StandardError#initialize} (via `super message`).
47
- #
48
- # This allows {NRSER::ValueError} subclasses that are able to build a useful
49
- # default message or would like to augment the user-provided one to do so
50
- # at the last possible moment before it's needed, letting them work with an
51
- # otherwise fully-initialized instance.
52
- #
53
- # Hence a subclass several generations down from {NRSER::ValueError} can
54
- # use values initialized in all the constructors in-between, avoiding a lot
55
- # of headache.
56
- #
57
- # This implementation always raises {NRSER::AbstractMethodError} because
58
- # {NRSER::ValueError} does not have enough information to construct a useful
59
- # message.
60
- #
61
- # @return [String]
62
- # Implementations must return the message string for
63
- # {StadardError#initialize}.
64
- #
65
- # @raise [NRSER::AbstractMethodError]
66
- # Must be implemented by subclasses if they wish to use message building.
44
+ def_context_delegator keys: :value
45
+
46
+
47
+ # @!method initialize *message, **kwds
48
+ # Create a new {ValueError}.
49
+ #
50
+ # @param [Array] message
51
+ # See {NicerError#initialize}.
52
+ #
53
+ # @param [Hash<Symbol, Object>] kwds
54
+ # Except as called out below, other keywords are passed up to
55
+ # {NicerError#initialize}.
56
+ #
57
+ # @option kwds [Object] :value
58
+ # The problematic value.
67
59
  #
68
- def build_message
69
- raise NRSER::AbstractMethodError.new( self, __method__ )
70
- end
71
-
72
- end
60
+
61
+ end # class ValueError
62
+
63
+
64
+ # /Namespace
65
+ # ========================================================================
66
+
67
+ end # module NRSER
@@ -1,7 +1,5 @@
1
- ##
2
1
  # Require everything in `//lib/nrser/functions` - the core functional
3
2
  # interfaces that underlie all the refinements.
4
- ##
5
3
 
6
4
  require_relative './functions/proc'
7
5
  require_relative './functions/object'
@@ -48,7 +48,7 @@ module NRSER
48
48
  # Passed as only argument to {NRSER::Types.length} to create the length
49
49
  # type the results are checked against.
50
50
  #
51
- # @param [Proc] &block
51
+ # @param [Proc] block
52
52
  # `#find`/`#find_all`-style block that will be called with each entry
53
53
  # from `enum`. Truthy responses mean the entry matched.
54
54
  #
@@ -109,7 +109,7 @@ module NRSER
109
109
  # Enumerable in question (really, anything that responds to `#first` and
110
110
  # `#count`).
111
111
  #
112
- # @param [D] default:
112
+ # @param [D] default
113
113
  # Value to return if `enum` does not have only one entry.
114
114
  #
115
115
  # @return [E]
@@ -142,19 +142,7 @@ module NRSER
142
142
  count = enum.count
143
143
 
144
144
  unless count == 1
145
- message = binding.erb <<-END
146
- Expected enumerable to have #count == 1 but it has
147
-
148
- #count = <%= enum.count %>
149
-
150
- Enumerable (class: <%= enum.class %>):
151
-
152
- <%= enum.pretty_inspect %>
153
-
154
- END
155
-
156
- raise NRSER::CountError.new message,
157
- subject: enum,
145
+ raise NRSER::CountError.new value: enum,
158
146
  count: count,
159
147
  expected: 1
160
148
  end
@@ -206,7 +194,7 @@ module NRSER
206
194
  # {Enumerable} (or other object with compatible `#each_with_object` and
207
195
  # `#to_enum` methods) you want to count.
208
196
  #
209
- # @param [Proc<(E)=>C>] &block
197
+ # @param [Proc<(E)=>C>] block
210
198
  # Block mapping entries in `enum` to the group to count them in.
211
199
  #
212
200
  # @return [Hash{C=>Integer}]
@@ -229,7 +217,7 @@ module NRSER
229
217
  # @param [Enumerable<E>] enum
230
218
  # Values to call `&block` with.
231
219
  #
232
- # @param [Proc<E=>V>] &block
220
+ # @param [Proc<E=>V>] block
233
221
  # Block to call, which is expected to raise an error if it fails.
234
222
  #
235
223
  # @return [V]
@@ -24,7 +24,7 @@ module NRSER
24
24
  # @param [Enumerable<V>] enum
25
25
  # Enumerable containing the values for the hash.
26
26
  #
27
- # @param [Proc<(V)=>K>] &block
27
+ # @param [Proc<(V)=>K>] block
28
28
  # Block that maps `enum` values to their hash keys.
29
29
  #
30
30
  # @return [Hash<K, V>]
@@ -53,12 +53,21 @@ module NRSER
53
53
  # Create a {Hash} mapping the entries in `enum` to the value returned by
54
54
  # passing them through `&block`, raising on conflicts.
55
55
  #
56
+ # @param [Enumerable<ENTRY>] enum
56
57
  #
57
- # @param [type] arg_name
58
- # @todo Add name param description.
58
+ # @param [ :raise | :first_wins | :last_wins | Proc ] on_conflict
59
+ # What to do when there's a conflict mapping the entries into the hash.
60
+ #
61
+ # The names are meant to make some sense.
59
62
  #
60
- # @return [return_type]
61
- # @todo Document return value.
63
+ # @param [Proc<(ENTRY)=>VALUE>] block
64
+ # The star of the show! Maps `ENTRY` from `enum` to `VALUE` for the
65
+ # resulting hash.
66
+ #
67
+ # @return [Hash<ENTRY, VALUE>]
68
+ #
69
+ # @raise [NRSER::ConflictError]
70
+ # If a conflict occurs and `on_conflict` is set to `:raise`.
62
71
  #
63
72
  def self.assoc_to enum, on_conflict: :raise, &block
64
73
  enum.each_with_object( {} ) { |entry, hash|
@@ -17,7 +17,7 @@ module NRSER
17
17
  # @param [Enumerable<E>] enum
18
18
  # Entries to search (in order).
19
19
  #
20
- # @param [Proc<(E)=>R>] &block
20
+ # @param [Proc<(E)=>R>] block
21
21
  # Block mapping entires to results.
22
22
  #
23
23
  # @return [nil]
@@ -22,7 +22,7 @@ module NRSER
22
22
  # The {Enumerable} slice that we want to see if `enum` includes. Must
23
23
  # support `#length` and `#slice` like {Array} does.
24
24
  #
25
- # @param [Proc<(E, S)=>Boolean>] &is_match
25
+ # @param [Proc<(E, S)=>Boolean>] is_match
26
26
  # Optional {Proc} that accepts an entry from `enum` and an entry from
27
27
  # `slice` and returns if they match.
28
28
  #
@@ -22,7 +22,7 @@ module NRSER
22
22
  # @param [Object] value
23
23
  # The value to set at the end of the path.
24
24
  #
25
- # @param [Class | :guess] parsed_key_type:
25
+ # @param [Class | :guess] parsed_key_type
26
26
  # How to handle parsed key path segments:
27
27
  #
28
28
  # - `String` - use the strings that naturally split from a parsed
@@ -68,17 +68,7 @@ module NRSER
68
68
  create_arrays_for_unsigned_keys: create_arrays_for_unsigned_keys
69
69
  end # .bury!
70
70
 
71
-
72
- # @todo Document _internal_bury! method.
73
- #
74
- # @private
75
- #
76
- # @param [type] arg_name
77
- # @todo Add name param description.
78
- #
79
- # @return [return_type]
80
- # @todo Document return value.
81
- #
71
+
82
72
  def self._internal_bury! tree,
83
73
  key_path,
84
74
  value,
@@ -8,11 +8,11 @@ module NRSER
8
8
  # @param [Array<Hash>] current
9
9
  # Current (base) array of hashes to start with (lowest predominance).
10
10
  #
11
- # @param [Array<Hash>] *updates
11
+ # @param [Array<Hash>] updates
12
12
  # One or more arrays of update hashes to merge over `current` (last is
13
13
  # highest predominance).
14
14
  #
15
- # @param [Proc<(Hash)=>Object>] &merge_key
15
+ # @param [Proc<(Hash)=>Object>] merge_key
16
16
  # Each hash is passed to `&merge_key` and the result is used to match
17
17
  # hashes for merge. Must not return equal values for two different hashes
18
18
  # in any of the arrays (`current` or any of `*updates`).