Class: XTF::Search::Element::AllDocs
- Inherits:
-
Object
- Object
- XTF::Search::Element::AllDocs
- Defined in:
- lib/xtf/search/element/all_docs.rb
Overview
This class is used inside a Query to retrieve all docs. It’s primary purpose is for use with Facets:
query = Query.new
query.content << AllDocs.new
query.content << Facet.new('word')
Instance Attribute Summary collapse
-
#tag_name ⇒ Object
readonly
Returns the value of attribute tag_name.
Instance Method Summary collapse
-
#initialize ⇒ AllDocs
constructor
A new instance of AllDocs.
- #to_xml ⇒ Object
- #to_xml_node ⇒ Object
Constructor Details
#initialize ⇒ AllDocs
Returns a new instance of AllDocs.
12 13 14 15 |
# File 'lib/xtf/search/element/all_docs.rb', line 12 def initialize @tag_name = "all_docs" super end |
Instance Attribute Details
#tag_name ⇒ Object (readonly)
Returns the value of attribute tag_name.
10 11 12 |
# File 'lib/xtf/search/element/all_docs.rb', line 10 def tag_name @tag_name end |
Instance Method Details
#to_xml ⇒ Object
20 21 22 |
# File 'lib/xtf/search/element/all_docs.rb', line 20 def to_xml to_xml_node.to_s end |
#to_xml_node ⇒ Object
17 18 19 |
# File 'lib/xtf/search/element/all_docs.rb', line 17 def to_xml_node XTF::XML::Element.new(self.tag_name.to_s.camelize(:lower)) end |