Class: EndecaOnDemand::Response::RecordsSet
- Includes:
- PP
- Defined in:
- lib/endeca_on_demand/response/records_set.rb,
lib/endeca_on_demand/response/records_set/record.rb
Defined Under Namespace
Classes: Record
Instance Attribute Summary collapse
-
#parent ⇒ Object
readonly
fields ##.
-
#records ⇒ Object
readonly
associations ##.
Attributes inherited from Proxy
Instance Method Summary collapse
-
#class ⇒ Object
override proxy ##.
-
#initialize(parent, xml) ⇒ RecordsSet
constructor
A new instance of RecordsSet.
- #inspect_attributes ⇒ Object
-
#options ⇒ Object
data ##.
Methods included from PP
Methods inherited from Proxy
Constructor Details
#initialize(parent, xml) ⇒ RecordsSet
Returns a new instance of RecordsSet.
13 14 15 16 17 |
# File 'lib/endeca_on_demand/response/records_set.rb', line 13 def initialize(parent, xml) @parent, @xml = parent, 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
#parent ⇒ Object (readonly)
fields ##
11 12 13 |
# File 'lib/endeca_on_demand/response/records_set.rb', line 11 def parent @parent end |
#records ⇒ Object (readonly)
associations ##
11 12 13 |
# File 'lib/endeca_on_demand/response/records_set.rb', line 11 def records @records end |
Instance Method Details
#class ⇒ Object
override proxy ##
21 22 23 |
# File 'lib/endeca_on_demand/response/records_set.rb', line 21 def class EndecaOnDemand::Response::RecordsSet end |
#inspect_attributes ⇒ Object
7 |
# File 'lib/endeca_on_demand/response/records_set.rb', line 7 def inspect_attributes; [ :options, :records ]; end |
#options ⇒ Object
data ##
37 38 39 40 41 42 43 |
# File 'lib/endeca_on_demand/response/records_set.rb', line 37 def @options ||= xml.xpath('child::node()[not(local-name() = "Record")]').inject({}) do |hash,child| hash.tap do hash[child.name] = child.content end end.symbolize_keys end |