Sha256: bfb75c79ecc9310fab71c31641f756f4064a738f33491fa85d7ebcbeed449cb9
Contents?: true
Size: 436 Bytes
Versions: 9
Compression:
Stored size: 436 Bytes
Contents
module Praxis class MultipartPart attr_accessor :body attr_accessor :headers attr_accessor :filename def initialize(body, headers={}, filename: nil) @body = body @headers = headers @filename = filename end def status @headers['Status'].to_i end def encode! case @body when Hash, Array @body = JSON.pretty_generate(@body) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems