Sha256: 3c8cd64f5aa78e30c4c13f15f02e5c2eabec0cf066e6898d7aa6724f806a202f
Contents?: true
Size: 427 Bytes
Versions: 1
Compression:
Stored size: 427 Bytes
Contents
# frozen_string_literal: true module Pwush class Request attr_reader :body def initialize(auth:, app:, payload: nil) @auth = auth @app = app @payload = payload || {} @body = build_body(@payload) end def to_json(*_args) Oj.dump(body) end private def build_body(payload) { request: payload.merge(auth: @auth, application: @app) } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pwush-0.4.0 | lib/pwush/request.rb |