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

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

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(search_report, xml) ⇒ Search

Returns a new instance of Search



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

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

#search_reportObject (readonly)

fields ##



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

def search_report
  @search_report
end

Instance Method Details

#classObject

override proxy ##



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

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

#inspect_attributesObject



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

def inspect_attributes; [ :options ]; end

#optionsObject

data ##



31
32
33
34
35
36
37
# File 'lib/endeca_on_demand/response/applied_filters/search_report/search.rb', line 31

def options
  @options ||= xml.children.inject({}) do |hash,child|
      hash.tap do
        hash[child.name] = child.content
      end
    end.symbolize_keys
end