Class: EndecaOnDemand::Response
- Includes:
- PP
- Defined in:
- lib/endeca_on_demand/response.rb,
lib/endeca_on_demand/response/property.rb,
lib/endeca_on_demand/response/dimension.rb,
lib/endeca_on_demand/response/breadcrumb.rb,
lib/endeca_on_demand/response/records_set.rb,
lib/endeca_on_demand/response/applied_filters.rb,
lib/endeca_on_demand/response/breadcrumb/bread.rb,
lib/endeca_on_demand/response/keyword_redirect.rb,
lib/endeca_on_demand/response/records_set/record.rb,
lib/endeca_on_demand/response/business_rules_result.rb,
lib/endeca_on_demand/response/dimension/dimension_value.rb,
lib/endeca_on_demand/response/applied_filters/search_report.rb,
lib/endeca_on_demand/response/business_rules_result/business_rule.rb,
lib/endeca_on_demand/response/applied_filters/search_report/search.rb,
lib/endeca_on_demand/response/applied_filters/selected_dimension_value_id.rb
Defined Under Namespace
Classes: AppliedFilters, Breadcrumb, BusinessRulesResult, Dimension, KeywordRedirect, Property, RecordsSet
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
fields ##.
-
#query ⇒ Object
readonly
fields ##.
-
#result ⇒ Object
readonly
fields ##.
-
#xml ⇒ Object
readonly
data ##.
Instance Method Summary collapse
- #applied_filters ⇒ Object
- #breadcrumbs ⇒ Object
- #business_rules_result ⇒ Object
-
#class ⇒ Object
override proxy ##.
- #dimensions ⇒ Object
-
#initialize(query, result) ⇒ Response
constructor
A new instance of Response.
- #inspect_attributes ⇒ Object
- #keyword_redirects ⇒ Object
-
#records_set ⇒ Object
associations ##.
-
#valid? ⇒ Boolean
flags ##.
Methods included from PP
Methods inherited from Proxy
Constructor Details
#initialize(query, result) ⇒ Response
Returns a new instance of Response.
11 12 13 |
# File 'lib/endeca_on_demand/response.rb', line 11 def initialize(query, result) @query, @result = query, result end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class EndecaOnDemand::Proxy
Instance Attribute Details
#errors ⇒ Object (readonly)
fields ##
9 10 11 |
# File 'lib/endeca_on_demand/response.rb', line 9 def errors @errors end |
#query ⇒ Object (readonly)
fields ##
9 10 11 |
# File 'lib/endeca_on_demand/response.rb', line 9 def query @query end |
#result ⇒ Object (readonly)
fields ##
9 10 11 |
# File 'lib/endeca_on_demand/response.rb', line 9 def result @result end |
#xml ⇒ Object (readonly)
data ##
9 10 11 |
# File 'lib/endeca_on_demand/response.rb', line 9 def xml @xml end |
Instance Method Details
#applied_filters ⇒ Object
41 42 43 |
# File 'lib/endeca_on_demand/response.rb', line 41 def applied_filters @applied_filters ||= EndecaOnDemand::Response::AppliedFilters.new(self, xml.root.children.css('AppliedFilters')) end |
#breadcrumbs ⇒ Object
29 30 31 |
# File 'lib/endeca_on_demand/response.rb', line 29 def @breadcrumbs ||= EndecaOnDemand::Collection.new(EndecaOnDemand::Response::Breadcrumb, xml.root.children.css('Breadcrumbs > Breads'), self) end |
#business_rules_result ⇒ Object
37 38 39 |
# File 'lib/endeca_on_demand/response.rb', line 37 def business_rules_result @business_rules_result ||= EndecaOnDemand::Response::BusinessRulesResult.new(self, xml.root.children.css('BusinessRulesResult > BusinessRules')) end |
#class ⇒ Object
override proxy ##
17 18 19 |
# File 'lib/endeca_on_demand/response.rb', line 17 def class EndecaOnDemand::Response end |
#dimensions ⇒ Object
33 34 35 |
# File 'lib/endeca_on_demand/response.rb', line 33 def dimensions @dimensions ||= EndecaOnDemand::Collection.new(EndecaOnDemand::Response::Dimension, xml.root.children.css('Dimensions > Dimension'), self) end |
#inspect_attributes ⇒ Object
6 |
# File 'lib/endeca_on_demand/response.rb', line 6 def inspect_attributes; [ :applied_filters, :breadcrumbs, :business_rules_result, :dimensions, :keyword_redirects, :records_set ]; end |
#keyword_redirects ⇒ Object
45 46 47 |
# File 'lib/endeca_on_demand/response.rb', line 45 def keyword_redirects @keyword_redirects ||= EndecaOnDemand::Collection.new(EndecaOnDemand::Response::KeywordRedirect, xml.root.children.css('KeywordRedirects'), self) end |
#records_set ⇒ Object
associations ##
25 26 27 |
# File 'lib/endeca_on_demand/response.rb', line 25 def records_set @records_set ||= EndecaOnDemand::Response::RecordsSet.new(self, xml.root.children.css('RecordsSet')) end |
#valid? ⇒ Boolean
flags ##
61 62 63 |
# File 'lib/endeca_on_demand/response.rb', line 61 def valid? errors.blank? end |