Class: GSA::Engine

Inherits:
Object
  • Object
show all
Defined in:
lib/bcms_google_mini_search/gsa.rb

Overview

Represents a single instance of a Google Mini

Direct Known Subclasses

Appliance

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Engine

Returns a new instance of Engine.



8
9
10
11
12
13
14
# File 'lib/bcms_google_mini_search/gsa.rb', line 8

def initialize(options = {})
  self.port = 8080
  self.path = "/search"
  self.host = options[:host]
  self.default_front_end = options[:front_end]
  self.default_collection = options[:collection]
end

Instance Attribute Details

#default_collectionObject

Returns the value of attribute default_collection.



6
7
8
# File 'lib/bcms_google_mini_search/gsa.rb', line 6

def default_collection
  @default_collection
end

#default_front_endObject

Returns the value of attribute default_front_end.



6
7
8
# File 'lib/bcms_google_mini_search/gsa.rb', line 6

def default_front_end
  @default_front_end
end

#hostObject

Returns the value of attribute host.



6
7
8
# File 'lib/bcms_google_mini_search/gsa.rb', line 6

def host
  @host
end

#pathObject

Returns the value of attribute path.



6
7
8
# File 'lib/bcms_google_mini_search/gsa.rb', line 6

def path
  @path
end

#portObject

Returns the value of attribute port.



6
7
8
# File 'lib/bcms_google_mini_search/gsa.rb', line 6

def port
  @port
end

Instance Method Details

#options_for_queryObject

Return a Hash suitable to be passed to SearchResult.find()



17
18
19
# File 'lib/bcms_google_mini_search/gsa.rb', line 17

def options_for_query
  {:host=>host, :front_end=>default_front_end, :collection=>default_collection}
end