Class: DHC::Formats::Multipart
- Inherits:
-
DHC::Format
- Object
- DHC::Format
- DHC::Formats::Multipart
- Includes:
- BasicMethodsConcern
- Defined in:
- lib/dhc/formats/multipart.rb
Class Method Summary collapse
Instance Method Summary collapse
- #as_json(input) ⇒ Object
- #as_open_struct(input) ⇒ Object
- #format_options(options) ⇒ Object
- #to_body(input) ⇒ Object
- #to_s ⇒ Object
- #to_sym ⇒ Object
Class Method Details
.request(options) ⇒ Object
7 8 9 10 |
# File 'lib/dhc/formats/multipart.rb', line 7 def self.request() [:format] = new super() end |
Instance Method Details
#as_json(input) ⇒ Object
19 20 21 |
# File 'lib/dhc/formats/multipart.rb', line 19 def as_json(input) parse(input) end |
#as_open_struct(input) ⇒ Object
23 24 25 |
# File 'lib/dhc/formats/multipart.rb', line 23 def as_open_struct(input) parse(input) end |
#format_options(options) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/dhc/formats/multipart.rb', line 12 def () [:headers] ||= {} no_content_type_header!() [:headers]['Content-Type'] = 'multipart/form-data' end |
#to_body(input) ⇒ Object
27 28 29 |
# File 'lib/dhc/formats/multipart.rb', line 27 def to_body(input) input end |
#to_s ⇒ Object
31 32 33 |
# File 'lib/dhc/formats/multipart.rb', line 31 def to_s 'multipart' end |
#to_sym ⇒ Object
35 36 37 |
# File 'lib/dhc/formats/multipart.rb', line 35 def to_sym to_s.to_sym end |