Class: EndecaOnDemand::Response::KeywordRedirect
- Includes:
- PP
- Defined in:
- lib/endeca_on_demand/response/keyword_redirect.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
fields ##.
Attributes inherited from Proxy
Instance Method Summary collapse
-
#class ⇒ Object
override proxy ##.
-
#initialize(response, xml) ⇒ KeywordRedirect
constructor
A new instance of KeywordRedirect.
- #inspect_attributes ⇒ Object
-
#options ⇒ Object
data ##.
Methods included from PP
Methods inherited from Proxy
Constructor Details
#initialize(response, xml) ⇒ KeywordRedirect
Returns a new instance of KeywordRedirect.
13 14 15 16 17 |
# File 'lib/endeca_on_demand/response/keyword_redirect.rb', line 13 def initialize(response, xml) @response, @xml = response, xml define_getters(:options) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class EndecaOnDemand::Proxy
Instance Attribute Details
#response ⇒ Object (readonly)
fields ##
11 12 13 |
# File 'lib/endeca_on_demand/response/keyword_redirect.rb', line 11 def response @response end |
Instance Method Details
#class ⇒ Object
override proxy ##
21 22 23 |
# File 'lib/endeca_on_demand/response/keyword_redirect.rb', line 21 def class EndecaOnDemand::Response::KeywordRedirect end |
#inspect_attributes ⇒ Object
7 |
# File 'lib/endeca_on_demand/response/keyword_redirect.rb', line 7 def inspect_attributes; [ :options ]; end |
#options ⇒ Object
data ##
29 30 31 32 33 34 35 |
# File 'lib/endeca_on_demand/response/keyword_redirect.rb', line 29 def @options ||= xml.children.inject({}) do |hash,child| hash.tap do hash[child.name] = child.content end end.symbolize_keys end |