Sha256: 0ccd97cf41c1f2e952ee75f652cedb5bf60c9ba868956500ba00a7d032d89757
Contents?: true
Size: 453 Bytes
Versions: 20
Compression:
Stored size: 453 Bytes
Contents
# frozen_string_literal: true # Response data is data provided through the response body # but made accssible in the ruby world module LHC::Response::Data::Base def as_json @json ||= (@data || @response.format.as_json(@response.body)) end def as_open_struct @open_struct ||= if @data JSON.parse(@data.to_json, object_class: OpenStruct) else @response.format.as_open_struct(@response.body) end end end
Version data entries
20 entries across 20 versions & 1 rubygems