Module: Docker::Util
Overview
This module holds shared logic that doesn’t really belong anywhere else in the gem.
Instance Method Summary collapse
Instance Method Details
#parse_json(body) ⇒ Object
7 8 9 10 11 |
# File 'lib/docker/util.rb', line 7 def parse_json(body) JSON.parse(body) unless body.nil? || body.empty? || (body == 'null') rescue JSON::ParserError => ex raise UnexpectedResponseError, ex. end |