Class: Stretch::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/stretch/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



7
8
9
10
11
# File 'lib/stretch/client.rb', line 7

def initialize options = {}
  self.tap do
    @connection = Stretch::Connection.new options
  end
end

Instance Method Details

#clusterObject



13
14
15
# File 'lib/stretch/client.rb', line 13

def cluster
  Cluster.new @connection
end

#index(name) ⇒ Object



17
18
19
# File 'lib/stretch/client.rb', line 17

def index name
  Index.new name, @connection
end