Class: Fictium::Postman::V2Exporter::RequestFormatter
- Inherits:
-
Object
- Object
- Fictium::Postman::V2Exporter::RequestFormatter
- Defined in:
- lib/fictium/exporters/postman/v2_exporter/request_formatter.rb
Constant Summary collapse
- PATH_VARIABLE =
/{(?<var>[A-Z_\-][A-Z0-9_\-]*)}/i.freeze
Instance Method Summary collapse
Instance Method Details
#format(example) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/fictium/exporters/postman/v2_exporter/request_formatter.rb', line 7 def format(example) {}.tap do |result| result.merge!( url: format_url(example), method: example.action.method.to_s.downcase, description: example.action.description, header: header_formatter.format(example.request) ) add_optional_values(example, result) end end |