Module: Swiftype::Client::Engine

Included in:
Swiftype::Client
Defined in:
lib/swiftype/client.rb

Instance Method Summary collapse

Instance Method Details

#create_engine(attributes) ⇒ Object



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

def create_engine(attributes)
  Swiftype::Engine.new(attributes).create!
end

#destroy_engine(id) ⇒ Object



23
24
25
# File 'lib/swiftype/client.rb', line 23

def destroy_engine(id)
  Swiftype::Engine.find(id).destroy!
end

#engine(id) ⇒ Object



9
10
11
# File 'lib/swiftype/client.rb', line 9

def engine(id)
  Swiftype::Engine.find(id)
end

#update_engine(id, attributes) ⇒ Object



17
18
19
20
21
# File 'lib/swiftype/client.rb', line 17

def update_engine(id, attributes)
  engine = Swiftype::Engine.find(id)
  engine.merge!(attributes)
  engine.update!(attributes)
end