Class: NFAgent::ClientResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/nfagent/client_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ ClientResponse

Returns a new instance of ClientResponse.

Yields:

  • (_self)

Yield Parameters:



5
6
7
# File 'lib/nfagent/client_response.rb', line 5

def initialize
  yield self if block_given?
end

Instance Attribute Details

#messageObject

Returns the value of attribute message.



3
4
5
# File 'lib/nfagent/client_response.rb', line 3

def message
  @message
end

#responseObject

Returns the value of attribute response.



3
4
5
# File 'lib/nfagent/client_response.rb', line 3

def response
  @response
end

Instance Method Details

#ok?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/nfagent/client_response.rb', line 9

def ok?
  Net::HTTPOK === response
end