lithic 0.1.0.pre.alpha.7 → 0.1.0.pre.alpha.9

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 (40) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -1
  3. data/lib/lithic/internal/transport/base_client.rb +1 -1
  4. data/lib/lithic/internal/transport/pooled_net_requester.rb +14 -5
  5. data/lib/lithic/internal/type/array_of.rb +12 -2
  6. data/lib/lithic/internal/type/base_model.rb +9 -5
  7. data/lib/lithic/internal/type/boolean.rb +5 -1
  8. data/lib/lithic/internal/type/converter.rb +42 -17
  9. data/lib/lithic/internal/type/enum.rb +5 -1
  10. data/lib/lithic/internal/type/hash_of.rb +6 -2
  11. data/lib/lithic/internal/type/io_like.rb +75 -0
  12. data/lib/lithic/internal/type/request_parameters.rb +11 -2
  13. data/lib/lithic/internal/type/union.rb +7 -3
  14. data/lib/lithic/internal/type/unknown.rb +5 -1
  15. data/lib/lithic/internal/util.rb +80 -21
  16. data/lib/lithic/version.rb +1 -1
  17. data/lib/lithic.rb +1 -0
  18. data/rbi/lib/lithic/internal/transport/pooled_net_requester.rbi +1 -1
  19. data/rbi/lib/lithic/internal/type/array_of.rbi +9 -7
  20. data/rbi/lib/lithic/internal/type/base_model.rbi +7 -3
  21. data/rbi/lib/lithic/internal/type/boolean.rbi +13 -3
  22. data/rbi/lib/lithic/internal/type/converter.rbi +20 -10
  23. data/rbi/lib/lithic/internal/type/enum.rbi +12 -3
  24. data/rbi/lib/lithic/internal/type/hash_of.rbi +6 -3
  25. data/rbi/lib/lithic/internal/type/io_like.rbi +49 -0
  26. data/rbi/lib/lithic/internal/type/union.rbi +10 -6
  27. data/rbi/lib/lithic/internal/type/unknown.rbi +10 -6
  28. data/rbi/lib/lithic/internal/util.rbi +35 -4
  29. data/sig/lithic/internal/transport/pooled_net_requester.rbs +1 -1
  30. data/sig/lithic/internal/type/array_of.rbs +5 -2
  31. data/sig/lithic/internal/type/base_model.rbs +5 -2
  32. data/sig/lithic/internal/type/boolean.rbs +5 -2
  33. data/sig/lithic/internal/type/converter.rbs +11 -5
  34. data/sig/lithic/internal/type/enum.rbs +5 -2
  35. data/sig/lithic/internal/type/hash_of.rbs +5 -2
  36. data/sig/lithic/internal/type/io_like.rbs +23 -0
  37. data/sig/lithic/internal/type/union.rbs +5 -2
  38. data/sig/lithic/internal/type/unknown.rbs +5 -2
  39. data/sig/lithic/internal/util.rbs +17 -2
  40. metadata +5 -2
data/lib/lithic.rb CHANGED
@@ -40,6 +40,7 @@ require_relative "lithic/internal/util"
40
40
  require_relative "lithic/internal/type/converter"
41
41
  require_relative "lithic/internal/type/unknown"
42
42
  require_relative "lithic/internal/type/boolean"
43
+ require_relative "lithic/internal/type/io_like"
43
44
  require_relative "lithic/internal/type/enum"
44
45
  require_relative "lithic/internal/type/union"
45
46
  require_relative "lithic/internal/type/array_of"
@@ -35,7 +35,7 @@ module Lithic
35
35
  request: Lithic::Internal::Transport::PooledNetRequester::RequestShape,
36
36
  blk: T.proc.params(arg0: String).void
37
37
  )
38
- .returns(Net::HTTPGenericRequest)
38
+ .returns([Net::HTTPGenericRequest, T.proc.void])
39
39
  end
40
40
  def build_request(request, &blk); end
41
41
  end
@@ -36,11 +36,10 @@ module Lithic
36
36
  # @api private
37
37
  sig(:final) do
38
38
  override
39
- .params(value: T.any(
40
- T::Array[T.anything],
41
- T.anything
42
- ),
43
- state: Lithic::Internal::Type::Converter::State)
39
+ .params(
40
+ value: T.any(T::Array[T.anything], T.anything),
41
+ state: Lithic::Internal::Type::Converter::CoerceState
42
+ )
44
43
  .returns(T.any(T::Array[T.anything], T.anything))
45
44
  end
46
45
  def coerce(value, state:); end
@@ -48,10 +47,13 @@ module Lithic
48
47
  # @api private
49
48
  sig(:final) do
50
49
  override
51
- .params(value: T.any(T::Array[T.anything], T.anything))
50
+ .params(
51
+ value: T.any(T::Array[T.anything], T.anything),
52
+ state: Lithic::Internal::Type::Converter::DumpState
53
+ )
52
54
  .returns(T.any(T::Array[T.anything], T.anything))
53
55
  end
54
- def dump(value); end
56
+ def dump(value, state:); end
55
57
 
56
58
  # @api private
57
59
  sig(:final) { returns(Elem) }
@@ -122,7 +122,7 @@ module Lithic
122
122
  override
123
123
  .params(
124
124
  value: T.any(Lithic::Internal::Type::BaseModel, T::Hash[T.anything, T.anything], T.anything),
125
- state: Lithic::Internal::Type::Converter::State
125
+ state: Lithic::Internal::Type::Converter::CoerceState
126
126
  )
127
127
  .returns(T.any(T.attached_class, T.anything))
128
128
  end
@@ -131,10 +131,14 @@ module Lithic
131
131
  # @api private
132
132
  sig do
133
133
  override
134
- .params(value: T.any(T.attached_class, T.anything))
134
+ .params(value: T.any(
135
+ T.attached_class,
136
+ T.anything
137
+ ),
138
+ state: Lithic::Internal::Type::Converter::DumpState)
135
139
  .returns(T.any(T::Hash[T.anything, T.anything], T.anything))
136
140
  end
137
- def dump(value); end
141
+ def dump(value, state:); end
138
142
  end
139
143
 
140
144
  # Returns the raw value associated with the given key, if found. Otherwise, nil is
@@ -22,16 +22,26 @@ module Lithic
22
22
  # @api private
23
23
  sig(:final) do
24
24
  override
25
- .params(value: T.any(T::Boolean, T.anything), state: Lithic::Internal::Type::Converter::State)
25
+ .params(value: T.any(
26
+ T::Boolean,
27
+ T.anything
28
+ ),
29
+ state: Lithic::Internal::Type::Converter::CoerceState)
26
30
  .returns(T.any(T::Boolean, T.anything))
27
31
  end
28
32
  def coerce(value, state:); end
29
33
 
30
34
  # @api private
31
35
  sig(:final) do
32
- override.params(value: T.any(T::Boolean, T.anything)).returns(T.any(T::Boolean, T.anything))
36
+ override
37
+ .params(value: T.any(
38
+ T::Boolean,
39
+ T.anything
40
+ ),
41
+ state: Lithic::Internal::Type::Converter::DumpState)
42
+ .returns(T.any(T::Boolean, T.anything))
33
43
  end
34
- def dump(value); end
44
+ def dump(value, state:); end
35
45
  end
36
46
  end
37
47
  end
@@ -7,7 +7,7 @@ module Lithic
7
7
  module Converter
8
8
  Input = T.type_alias { T.any(Lithic::Internal::Type::Converter, T::Class[T.anything]) }
9
9
 
10
- State =
10
+ CoerceState =
11
11
  T.type_alias do
12
12
  {
13
13
  strictness: T.any(T::Boolean, Symbol),
@@ -16,18 +16,23 @@ module Lithic
16
16
  }
17
17
  end
18
18
 
19
+ DumpState = T.type_alias { {can_retry: T::Boolean} }
20
+
19
21
  # @api private
20
22
  sig do
21
- overridable.params(
22
- value: T.anything,
23
- state: Lithic::Internal::Type::Converter::State
24
- ).returns(T.anything)
23
+ overridable
24
+ .params(value: T.anything, state: Lithic::Internal::Type::Converter::CoerceState)
25
+ .returns(T.anything)
25
26
  end
26
27
  def coerce(value, state:); end
27
28
 
28
29
  # @api private
29
- sig { overridable.params(value: T.anything).returns(T.anything) }
30
- def dump(value); end
30
+ sig do
31
+ overridable
32
+ .params(value: T.anything, state: Lithic::Internal::Type::Converter::DumpState)
33
+ .returns(T.anything)
34
+ end
35
+ def dump(value, state:); end
31
36
 
32
37
  class << self
33
38
  # @api private
@@ -62,7 +67,7 @@ module Lithic
62
67
  params(
63
68
  target: Lithic::Internal::Type::Converter::Input,
64
69
  value: T.anything,
65
- state: Lithic::Internal::Type::Converter::State
70
+ state: Lithic::Internal::Type::Converter::CoerceState
66
71
  )
67
72
  .returns(T.anything)
68
73
  end
@@ -92,9 +97,14 @@ module Lithic
92
97
  ); end
93
98
  # @api private
94
99
  sig do
95
- params(target: Lithic::Internal::Type::Converter::Input, value: T.anything).returns(T.anything)
100
+ params(
101
+ target: Lithic::Internal::Type::Converter::Input,
102
+ value: T.anything,
103
+ state: Lithic::Internal::Type::Converter::DumpState
104
+ )
105
+ .returns(T.anything)
96
106
  end
97
- def self.dump(target, value); end
107
+ def self.dump(target, value, state: {can_retry: true}); end
98
108
  end
99
109
  end
100
110
  end
@@ -40,14 +40,23 @@ module Lithic
40
40
  # of the enum.
41
41
  sig do
42
42
  override
43
- .params(value: T.any(String, Symbol, T.anything), state: Lithic::Internal::Type::Converter::State)
43
+ .params(value: T.any(
44
+ String,
45
+ Symbol,
46
+ T.anything
47
+ ),
48
+ state: Lithic::Internal::Type::Converter::CoerceState)
44
49
  .returns(T.any(Symbol, T.anything))
45
50
  end
46
51
  def coerce(value, state:); end
47
52
 
48
53
  # @api private
49
- sig { override.params(value: T.any(Symbol, T.anything)).returns(T.any(Symbol, T.anything)) }
50
- def dump(value); end
54
+ sig do
55
+ override
56
+ .params(value: T.any(Symbol, T.anything), state: Lithic::Internal::Type::Converter::DumpState)
57
+ .returns(T.any(Symbol, T.anything))
58
+ end
59
+ def dump(value, state:); end
51
60
  end
52
61
  end
53
62
  end
@@ -38,7 +38,7 @@ module Lithic
38
38
  override
39
39
  .params(
40
40
  value: T.any(T::Hash[T.anything, T.anything], T.anything),
41
- state: Lithic::Internal::Type::Converter::State
41
+ state: Lithic::Internal::Type::Converter::CoerceState
42
42
  )
43
43
  .returns(T.any(Lithic::Internal::AnyHash, T.anything))
44
44
  end
@@ -47,10 +47,13 @@ module Lithic
47
47
  # @api private
48
48
  sig(:final) do
49
49
  override
50
- .params(value: T.any(T::Hash[T.anything, T.anything], T.anything))
50
+ .params(
51
+ value: T.any(T::Hash[T.anything, T.anything], T.anything),
52
+ state: Lithic::Internal::Type::Converter::DumpState
53
+ )
51
54
  .returns(T.any(Lithic::Internal::AnyHash, T.anything))
52
55
  end
53
- def dump(value); end
56
+ def dump(value, state:); end
54
57
 
55
58
  # @api private
56
59
  sig(:final) { returns(Elem) }
@@ -0,0 +1,49 @@
1
+ # typed: strong
2
+
3
+ module Lithic
4
+ module Internal
5
+ module Type
6
+ # @api private
7
+ #
8
+ # Either `Pathname` or `StringIO`.
9
+ class IOLike
10
+ extend Lithic::Internal::Type::Converter
11
+
12
+ abstract!
13
+ final!
14
+
15
+ sig(:final) { params(other: T.anything).returns(T::Boolean) }
16
+ def self.===(other); end
17
+
18
+ sig(:final) { params(other: T.anything).returns(T::Boolean) }
19
+ def self.==(other); end
20
+
21
+ class << self
22
+ # @api private
23
+ sig(:final) do
24
+ override
25
+ .params(value: T.any(
26
+ StringIO,
27
+ String,
28
+ T.anything
29
+ ),
30
+ state: Lithic::Internal::Type::Converter::CoerceState)
31
+ .returns(T.any(StringIO, T.anything))
32
+ end
33
+ def coerce(value, state:); end
34
+
35
+ # @api private
36
+ sig(:final) do
37
+ override
38
+ .params(
39
+ value: T.any(Pathname, StringIO, IO, String, T.anything),
40
+ state: Lithic::Internal::Type::Converter::DumpState
41
+ )
42
+ .returns(T.any(Pathname, StringIO, IO, String, T.anything))
43
+ end
44
+ def dump(value, state:); end
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -49,16 +49,20 @@ module Lithic
49
49
 
50
50
  # @api private
51
51
  sig do
52
- override.params(
53
- value: T.anything,
54
- state: Lithic::Internal::Type::Converter::State
55
- ).returns(T.anything)
52
+ override
53
+ .params(value: T.anything, state: Lithic::Internal::Type::Converter::CoerceState)
54
+ .returns(T.anything)
56
55
  end
57
56
  def coerce(value, state:); end
58
57
 
59
58
  # @api private
60
- sig { override.params(value: T.anything).returns(T.anything) }
61
- def dump(value); end
59
+ sig do
60
+ override.params(
61
+ value: T.anything,
62
+ state: Lithic::Internal::Type::Converter::DumpState
63
+ ).returns(T.anything)
64
+ end
65
+ def dump(value, state:); end
62
66
  end
63
67
  end
64
68
  end
@@ -21,16 +21,20 @@ module Lithic
21
21
  class << self
22
22
  # @api private
23
23
  sig(:final) do
24
- override.params(
25
- value: T.anything,
26
- state: Lithic::Internal::Type::Converter::State
27
- ).returns(T.anything)
24
+ override
25
+ .params(value: T.anything, state: Lithic::Internal::Type::Converter::CoerceState)
26
+ .returns(T.anything)
28
27
  end
29
28
  def coerce(value, state:); end
30
29
 
31
30
  # @api private
32
- sig(:final) { override.params(value: T.anything).returns(T.anything) }
33
- def dump(value); end
31
+ sig(:final) do
32
+ override.params(
33
+ value: T.anything,
34
+ state: Lithic::Internal::Type::Converter::DumpState
35
+ ).returns(T.anything)
36
+ end
37
+ def dump(value, state:); end
34
38
  end
35
39
  end
36
40
  end
@@ -140,10 +140,34 @@ module Lithic
140
140
  def normalized_headers(*headers); end
141
141
  end
142
142
 
143
+ # @api private
144
+ class SerializationAdapter
145
+ sig { returns(T.any(Pathname, IO)) }
146
+ attr_reader :inner
147
+
148
+ sig { params(a: T.anything).returns(String) }
149
+ def to_json(*a); end
150
+
151
+ sig { params(a: T.anything).returns(String) }
152
+ def to_yaml(*a); end
153
+
154
+ # @api private
155
+ sig { params(inner: T.any(Pathname, IO)).returns(T.attached_class) }
156
+ def self.new(inner); end
157
+ end
158
+
143
159
  # @api private
144
160
  #
145
161
  # An adapter that satisfies the IO interface required by `::IO.copy_stream`
146
162
  class ReadIOAdapter
163
+ # @api private
164
+ sig { returns(T.nilable(T::Boolean)) }
165
+ def close?; end
166
+
167
+ # @api private
168
+ sig { void }
169
+ def close; end
170
+
147
171
  # @api private
148
172
  sig { params(max_len: T.nilable(Integer)).returns(String) }
149
173
  private def read_enum(max_len); end
@@ -155,12 +179,12 @@ module Lithic
155
179
  # @api private
156
180
  sig do
157
181
  params(
158
- stream: T.any(String, IO, StringIO, T::Enumerable[String]),
182
+ src: T.any(String, Pathname, StringIO, T::Enumerable[String]),
159
183
  blk: T.proc.params(arg0: String).void
160
184
  )
161
185
  .returns(T.attached_class)
162
186
  end
163
- def self.new(stream, &blk); end
187
+ def self.new(src, &blk); end
164
188
  end
165
189
 
166
190
  class << self
@@ -171,9 +195,16 @@ module Lithic
171
195
  class << self
172
196
  # @api private
173
197
  sig do
174
- params(y: Enumerator::Yielder, boundary: String, key: T.any(Symbol, String), val: T.anything).void
198
+ params(
199
+ y: Enumerator::Yielder,
200
+ boundary: String,
201
+ key: T.any(Symbol, String),
202
+ val: T.anything,
203
+ closing: T::Array[T.proc.void]
204
+ )
205
+ .void
175
206
  end
176
- private def write_multipart_chunk(y, boundary:, key:, val:); end
207
+ private def write_multipart_chunk(y, boundary:, key:, val:, closing:); end
177
208
 
178
209
  # @api private
179
210
  sig { params(body: T.anything).returns([String, T::Enumerable[String]]) }
@@ -21,7 +21,7 @@ module Lithic
21
21
  Lithic::Internal::Transport::PooledNetRequester::request request
22
22
  ) {
23
23
  (String arg0) -> void
24
- } -> top
24
+ } -> [top, (^-> void)]
25
25
 
26
26
  private def with_pool: (
27
27
  URI::Generic url,
@@ -17,10 +17,13 @@ module Lithic
17
17
 
18
18
  def coerce: (
19
19
  ::Array[top] | top value,
20
- state: Lithic::Internal::Type::Converter::state
20
+ state: Lithic::Internal::Type::Converter::coerce_state
21
21
  ) -> (::Array[top] | top)
22
22
 
23
- def dump: (::Array[top] | top value) -> (::Array[top] | top)
23
+ def dump: (
24
+ ::Array[top] | top value,
25
+ state: Lithic::Internal::Type::Converter::dump_state
26
+ ) -> (::Array[top] | top)
24
27
 
25
28
  def item_type: -> Elem
26
29
 
@@ -53,10 +53,13 @@ module Lithic
53
53
 
54
54
  def self.coerce: (
55
55
  Lithic::Internal::Type::BaseModel | ::Hash[top, top] | top value,
56
- state: Lithic::Internal::Type::Converter::state
56
+ state: Lithic::Internal::Type::Converter::coerce_state
57
57
  ) -> (instance | top)
58
58
 
59
- def self.dump: (instance | top value) -> (::Hash[top, top] | top)
59
+ def self.dump: (
60
+ instance | top value,
61
+ state: Lithic::Internal::Type::Converter::dump_state
62
+ ) -> (::Hash[top, top] | top)
60
63
 
61
64
  def []: (Symbol key) -> top?
62
65
 
@@ -10,10 +10,13 @@ module Lithic
10
10
 
11
11
  def self.coerce: (
12
12
  bool | top value,
13
- state: Lithic::Internal::Type::Converter::state
13
+ state: Lithic::Internal::Type::Converter::coerce_state
14
14
  ) -> (bool | top)
15
15
 
16
- def self.dump: (bool | top value) -> (bool | top)
16
+ def self.dump: (
17
+ bool | top value,
18
+ state: Lithic::Internal::Type::Converter::dump_state
19
+ ) -> (bool | top)
17
20
  end
18
21
  end
19
22
  end
@@ -4,19 +4,24 @@ module Lithic
4
4
  module Converter
5
5
  type input = Lithic::Internal::Type::Converter | Class
6
6
 
7
- type state =
7
+ type coerce_state =
8
8
  {
9
9
  strictness: bool | :strong,
10
10
  exactness: { yes: Integer, no: Integer, maybe: Integer },
11
11
  branched: Integer
12
12
  }
13
13
 
14
+ type dump_state = { can_retry: bool }
15
+
14
16
  def coerce: (
15
17
  top value,
16
- state: Lithic::Internal::Type::Converter::state
18
+ state: Lithic::Internal::Type::Converter::coerce_state
17
19
  ) -> top
18
20
 
19
- def dump: (top value) -> top
21
+ def dump: (
22
+ top value,
23
+ state: Lithic::Internal::Type::Converter::dump_state
24
+ ) -> top
20
25
 
21
26
  def self.type_info: (
22
27
  {
@@ -31,12 +36,13 @@ module Lithic
31
36
  def self.coerce: (
32
37
  Lithic::Internal::Type::Converter::input target,
33
38
  top value,
34
- ?state: Lithic::Internal::Type::Converter::state
39
+ ?state: Lithic::Internal::Type::Converter::coerce_state
35
40
  ) -> top
36
41
 
37
42
  def self.dump: (
38
43
  Lithic::Internal::Type::Converter::input target,
39
- top value
44
+ top value,
45
+ ?state: Lithic::Internal::Type::Converter::dump_state
40
46
  ) -> top
41
47
  end
42
48
  end
@@ -14,10 +14,13 @@ module Lithic
14
14
 
15
15
  def coerce: (
16
16
  String | Symbol | top value,
17
- state: Lithic::Internal::Type::Converter::state
17
+ state: Lithic::Internal::Type::Converter::coerce_state
18
18
  ) -> (Symbol | top)
19
19
 
20
- def dump: (Symbol | top value) -> (Symbol | top)
20
+ def dump: (
21
+ Symbol | top value,
22
+ state: Lithic::Internal::Type::Converter::dump_state
23
+ ) -> (Symbol | top)
21
24
  end
22
25
  end
23
26
  end
@@ -17,10 +17,13 @@ module Lithic
17
17
 
18
18
  def coerce: (
19
19
  ::Hash[top, top] | top value,
20
- state: Lithic::Internal::Type::Converter::state
20
+ state: Lithic::Internal::Type::Converter::coerce_state
21
21
  ) -> (::Hash[Symbol, top] | top)
22
22
 
23
- def dump: (::Hash[top, top] | top value) -> (::Hash[Symbol, top] | top)
23
+ def dump: (
24
+ ::Hash[top, top] | top value,
25
+ state: Lithic::Internal::Type::Converter::dump_state
26
+ ) -> (::Hash[Symbol, top] | top)
24
27
 
25
28
  def item_type: -> Elem
26
29
 
@@ -0,0 +1,23 @@
1
+ module Lithic
2
+ module Internal
3
+ module Type
4
+ class IOLike
5
+ extend Lithic::Internal::Type::Converter
6
+
7
+ def self.===: (top other) -> bool
8
+
9
+ def self.==: (top other) -> bool
10
+
11
+ def self.coerce: (
12
+ StringIO | String | top value,
13
+ state: Lithic::Internal::Type::Converter::coerce_state
14
+ ) -> (StringIO | top)
15
+
16
+ def self.dump: (
17
+ Pathname | StringIO | IO | String | top value,
18
+ state: Lithic::Internal::Type::Converter::dump_state
19
+ ) -> (Pathname | StringIO | IO | String | top)
20
+ end
21
+ end
22
+ end
23
+ end
@@ -32,10 +32,13 @@ module Lithic
32
32
 
33
33
  def coerce: (
34
34
  top value,
35
- state: Lithic::Internal::Type::Converter::state
35
+ state: Lithic::Internal::Type::Converter::coerce_state
36
36
  ) -> top
37
37
 
38
- def dump: (top value) -> top
38
+ def dump: (
39
+ top value,
40
+ state: Lithic::Internal::Type::Converter::dump_state
41
+ ) -> top
39
42
  end
40
43
  end
41
44
  end
@@ -10,10 +10,13 @@ module Lithic
10
10
 
11
11
  def self.coerce: (
12
12
  top value,
13
- state: Lithic::Internal::Type::Converter::state
13
+ state: Lithic::Internal::Type::Converter::coerce_state
14
14
  ) -> top
15
15
 
16
- def self.dump: (top value) -> top
16
+ def self.dump: (
17
+ top value,
18
+ state: Lithic::Internal::Type::Converter::dump_state
19
+ ) -> top
17
20
  end
18
21
  end
19
22
  end
@@ -73,13 +73,27 @@ module Lithic
73
73
  | ::Array[(String | Integer)?])?] headers
74
74
  ) -> ::Hash[String, String]
75
75
 
76
+ class SerializationAdapter
77
+ attr_reader inner: Pathname | IO
78
+
79
+ def to_json: (*top a) -> String
80
+
81
+ def to_yaml: (*top a) -> String
82
+
83
+ def initialize: (Pathname | IO inner) -> void
84
+ end
85
+
76
86
  class ReadIOAdapter
87
+ def close?: -> bool?
88
+
89
+ def close: -> void
90
+
77
91
  private def read_enum: (Integer? max_len) -> String
78
92
 
79
93
  def read: (?Integer? max_len, ?String? out_string) -> String?
80
94
 
81
95
  def initialize: (
82
- String | IO | StringIO | Enumerable[String] stream
96
+ String | Pathname | StringIO | Enumerable[String] src
83
97
  ) {
84
98
  (String arg0) -> void
85
99
  } -> void
@@ -93,7 +107,8 @@ module Lithic
93
107
  Enumerator::Yielder y,
94
108
  boundary: String,
95
109
  key: Symbol | String,
96
- val: top
110
+ val: top,
111
+ closing: ::Array[^-> void]
97
112
  ) -> void
98
113
 
99
114
  def self?.encode_multipart_streaming: (