Class: ActionDispatch::Http::Multipart::Form
- Defined in:
- runtime/action_dispatch/multipart.rb,
runtime/action_dispatch/multipart.rbs
Overview
The parsed body: text fields by full name (message[body]),
files by full name. Two typed hashes rather than one mixed one,
so each serving path can nest them into its own params shape.
Instance Attribute Summary collapse
-
#fields ⇒ Hash[String, String]
readonly
Returns the value of attribute fields.
-
#files ⇒ Hash[String, ActionDispatch::Http::UploadedFile]
readonly
Returns the value of attribute files.
Instance Method Summary collapse
- #add_field(name, value) ⇒ void
- #add_file(name, file) ⇒ void
-
#initialize ⇒ Form
constructor
A new instance of Form.
Constructor Details
#initialize ⇒ Form
Returns a new instance of Form.
24 |
# File 'runtime/action_dispatch/multipart.rbs', line 24
def initialize: () -> void
|
Instance Attribute Details
#fields ⇒ Hash[String, String] (readonly)
Returns the value of attribute fields.
22 23 24 |
# File 'runtime/action_dispatch/multipart.rbs', line 22 def fields @fields end |
#files ⇒ Hash[String, ActionDispatch::Http::UploadedFile] (readonly)
Returns the value of attribute files.
23 24 25 |
# File 'runtime/action_dispatch/multipart.rbs', line 23 def files @files end |
Instance Method Details
#add_field(name, value) ⇒ void
25 |
# File 'runtime/action_dispatch/multipart.rbs', line 25
def add_field: (String name, String value) -> void
|
#add_file(name, file) ⇒ void
26 |
# File 'runtime/action_dispatch/multipart.rbs', line 26
def add_file: (String name, ActionDispatch::Http::UploadedFile file) -> void
|