sig/transcoder/multipart.rbs in httpx-1.2.4 vs sig/transcoder/multipart.rbs in httpx-1.2.6
- old
+ new
@@ -19,12 +19,12 @@
class Encoder
@boundary: String
@part_index: Integer
@buffer: String
- @form: Enumerable[[Symbol | string, multipart_nested_value]]
- @parts: Array[_Reader]
+ @form: Enumerable[[Symbol | string, Object & multipart_nested_value]]
+ @parts: Array[Object & _Reader]
def bytesize: () -> Integer
def content_type: () -> String
@@ -38,17 +38,22 @@
def initialize: (Enumerable[[Symbol | string, multipart_nested_value]] multipart_data) -> untyped
def header_part: (string key, String content_type, String? filename) -> StringIO
- def read_chunks: (String buffer, ?Integer? length) -> void
+ def read_chunks: (String buffer, ?int? length) -> void
- def read_from_part: (?Integer? max_length) -> String?
+ def read_from_part: (?int? max_length) -> String?
end
class Decoder
+ CRLF: String
BOUNDARY_RE: Regexp
+ MULTIPART_CONTENT_TYPE: Regexp
+ MULTIPART_CONTENT_DISPOSITION: Regexp
+ MULTIPART_CONTENT_ID: Regexp
+ WINDOW_SIZE: Integer
@state: :idle | :part_header | :part_body | :parse_boundary | :done
@buffer: String
@parts: Hash[String, untyped]
@boundary: String
@@ -73,11 +78,11 @@
def initialize: (String filename, String content_type) -> void
end
module Part
- def self?.call: [U] (_MultipartInput multipart_input) -> [U, String, String]
- | (multipart_nested_value input) -> ([StringIO, String, String?] | [File, String, String])
+ def self?.call: [U] (Object & _MultipartInput multipart_input) -> [U, String, String]
+ | (Object & multipart_nested_value input) -> ([StringIO, String, String?] | [File, String, String])
end
module MimeTypeDetector
DEFAULT_MIMETYPE: String