Sha256: 0512c80a0ee0fcb54823f0367eb04b9539fed97e2c6d7ba5ac6da75c3f1d1c93
Contents?: true
Size: 226 Bytes
Versions: 2
Compression:
Stored size: 226 Bytes
Contents
# frozen_string_literal: true require 'json' def response(data = nil, opts = {}) if data opts[:body] = JSON.dump(data) opts[:headers] ||= {} opts[:headers]['Content-Type'] = 'application/json' end opts end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
acfs-2.0.0 | spec/support/response.rb |
acfs-1.7.0 | spec/support/response.rb |