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