Class: Reactor::ResponseHandler::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/reactor/tools/response_handler/base.rb

Overview

Common base class to handle a xml response. Provides helper methods to extract the content from a xml response.

Direct Known Subclasses

String, XmlAttribute

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#contextObject

Returns the value of attribute context.



11
12
13
# File 'lib/reactor/tools/response_handler/base.rb', line 11

def context
  @context
end

#responseObject

Returns the value of attribute response.



10
11
12
# File 'lib/reactor/tools/response_handler/base.rb', line 10

def response
  @response
end

Instance Method Details

#get(response, context) ⇒ Object

Common strategy method for each sub class.



14
15
16
17
# File 'lib/reactor/tools/response_handler/base.rb', line 14

def get(response, context)
  @response = response
  @context = context
end