Class: OpenSearch::OpenSearchBase
- Inherits:
-
Object
- Object
- OpenSearch::OpenSearchBase
- Defined in:
- lib/opensearch/base.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(doc) ⇒ OpenSearchBase
constructor
A new instance of OpenSearchBase.
- #search(url, query, post = false) ⇒ Object
Constructor Details
#initialize(doc) ⇒ OpenSearchBase
Returns a new instance of OpenSearchBase.
10 11 12 13 14 |
# File 'lib/opensearch/base.rb', line 10 def initialize(doc) install_accessor setup_description doc self end |
Instance Method Details
#search(url, query, post = false) ⇒ Object
16 17 18 19 |
# File 'lib/opensearch/base.rb', line 16 def search(url, query, post = false) query = setup_query(url, query) post ? post_content(query, post) : get_content(query) end |