Class: EndecaOnDemand::Response::AppliedFilters::SearchReport

Inherits:
Proxy
  • Object
show all
Includes:
PP
Defined in:
lib/endeca_on_demand/response/applied_filters/search_report.rb,
lib/endeca_on_demand/response/applied_filters/search_report/search.rb

Defined Under Namespace

Classes: Search

Instance Attribute Summary collapse

Attributes inherited from Proxy

#xml

Instance Method Summary collapse

Methods included from PP

#inspect, #pretty_print

Methods inherited from Proxy

#inspect

Constructor Details

#initialize(applied_filters, xml) ⇒ SearchReport

Returns a new instance of SearchReport


14
15
16
17
18
# File 'lib/endeca_on_demand/response/applied_filters/search_report.rb', line 14

def initialize(applied_filters, xml)
  @applied_filters, @xml = applied_filters, 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

#applied_filtersObject (readonly)

fields ##


12
13
14
# File 'lib/endeca_on_demand/response/applied_filters/search_report.rb', line 12

def applied_filters
  @applied_filters
end

#searchObject (readonly)

associations ##


12
13
14
# File 'lib/endeca_on_demand/response/applied_filters/search_report.rb', line 12

def search
  @search
end

Instance Method Details

#classObject

override proxy ##


22
23
24
# File 'lib/endeca_on_demand/response/applied_filters/search_report.rb', line 22

def class
  EndecaOnDemand::Response::AppliedFilters::SearchReport
end

#inspect_attributesObject


8
# File 'lib/endeca_on_demand/response/applied_filters/search_report.rb', line 8

def inspect_attributes; [ :options, :search ]; end

#optionsObject

data ##


38
39
40
41
42
43
44
# File 'lib/endeca_on_demand/response/applied_filters/search_report.rb', line 38

def options
  @options ||= xml.xpath('child::node()[not(local-name() = "Search")]').inject({}) do |hash,child|
      hash.tap do
        hash[child.name] = child.content
      end
    end.symbolize_keys
end