Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Commit

Permalink
strict typed introduced for Nexmo::JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
hummusonrails committed Jun 3, 2020
1 parent 8f9d0b0 commit d7e8550
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/nexmo/json.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# typed: ignore
# typed: strict
# frozen_string_literal: true
require 'json'

module Nexmo
module JSON
extend T::Sig

sig { params(http_request: T.any(Net::HTTP::Put, Net::HTTP::Post), params: T::Hash[Symbol, T.untyped]).void }
def self.update(http_request, params)
http_request['Content-Type'] = 'application/json'
http_request.body = ::JSON.generate(params)
Expand Down

0 comments on commit d7e8550

Please sign in to comment.