Sha256: 801cd6bac9e8a6b082ce42f7453546082cacf84e1be8c1734b801c7f5107282d
Contents?: true
Size: 485 Bytes
Versions: 29
Compression:
Stored size: 485 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 private attr_reader :response end
Version data entries
29 entries across 29 versions & 1 rubygems