Sha256: 74362ebc4d06e088cc37ae9f3d46f39476e21453f8db49e95368ee5a5f3ab1ef
Contents?: true
Size: 650 Bytes
Versions: 25
Compression:
Stored size: 650 Bytes
Contents
module Isomorfeus module Puppetmaster class Response attr_reader :request def initialize(response_hash = {}) @response_hash = response_hash ? response_hash : {} @request = Isomorfeus::Puppetmaster::Request.new(@response_hash['request']) end def method_missing(name, *args) if %i[headers ok remote_address security_details status status_text text url].include?(name) @response_hash[name.to_s] elsif :ok? == name @response_hash['ok'] else super(name, *args) end end def ok? @response_hash[:ok] end end end end
Version data entries
25 entries across 25 versions & 1 rubygems