Class: RubyAem::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_aem/result.rb

Overview

Result class represents the result of a client call. It contains the following attributes:

  • message: a message string containing the description of the result

  • response: a RubyAem::Response response from AEM

  • data: the data payload, which can be of any type depending on the API call

e.g. is_* and exists method provide result with boolean data. Some API calls result doesn't contain any data.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, response) ⇒ Object

Initialise a result.

Parameters:

  • message

    result message

  • response

    HTTP response



33
34
35
36
# File 'lib/ruby_aem/result.rb', line 33

def initialize(message, response)
  @message = message
  @response = response
end

Instance Attribute Details

#dataObject

Returns the value of attribute data



26
27
28
# File 'lib/ruby_aem/result.rb', line 26

def data
  @data
end

#messageObject

Returns the value of attribute message



24
25
26
# File 'lib/ruby_aem/result.rb', line 24

def message
  @message
end

#responseObject (readonly)

Returns the value of attribute response



25
26
27
# File 'lib/ruby_aem/result.rb', line 25

def response
  @response
end