class Isomorfeus::Puppetmaster::Response

Attributes

request[R]

Public Class Methods

new(response_hash = {}) click to toggle source
# File lib/isomorfeus/puppetmaster/response.rb, line 6
def initialize(response_hash = {})
  @response_hash = response_hash ? response_hash : {}
  @request = Isomorfeus::Puppetmaster::Request.new(@response_hash['request'])
end

Public Instance Methods

method_missing(name, *args) click to toggle source
Calls superclass method
# File lib/isomorfeus/puppetmaster/response.rb, line 11
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
ok?() click to toggle source
# File lib/isomorfeus/puppetmaster/response.rb, line 21
def ok?
  @response_hash[:ok]
end