Class: LHC::Formats::Multipart
- Inherits:
-
LHC::Format
- Object
- LHC::Format
- LHC::Formats::Multipart
- Includes:
- BasicMethodsConcern
- Defined in:
- lib/lhc/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
5 6 7 8 |
# File 'lib/lhc/formats/multipart.rb', line 5 def self.request() [:format] = new super() end |
Instance Method Details
#as_json(input) ⇒ Object
17 18 19 |
# File 'lib/lhc/formats/multipart.rb', line 17 def as_json(input) parse(input) end |
#as_open_struct(input) ⇒ Object
21 22 23 |
# File 'lib/lhc/formats/multipart.rb', line 21 def as_open_struct(input) parse(input) end |
#format_options(options) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/lhc/formats/multipart.rb', line 10 def () [:headers] ||= {} no_content_type_header!() [:headers]['Content-Type'] = 'multipart/form-data' end |
#to_body(input) ⇒ Object
25 26 27 |
# File 'lib/lhc/formats/multipart.rb', line 25 def to_body(input) input end |
#to_s ⇒ Object
29 30 31 |
# File 'lib/lhc/formats/multipart.rb', line 29 def to_s 'multipart' end |
#to_sym ⇒ Object
33 34 35 |
# File 'lib/lhc/formats/multipart.rb', line 33 def to_sym to_s.to_sym end |