Class: OpenSearch::OpenSearchBase

Inherits:
Object
  • Object
show all
Defined in:
lib/opensearch/base.rb

Direct Known Subclasses

OpenSearch10, OpenSearch11

Instance Method Summary collapse

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