somleng/somleng

View on GitHub
lib/call_service/response.rb

Summary

Maintainability
A
0 mins
Test Coverage
module CallService
  class Response < SimpleDelegator
    def fetch(key)
      response_body.fetch(key.to_s)
    end

    private

    def response_body
      @response_body ||= JSON.parse(body)
    end
  end
end