Method: IndexTank::Function#add

Defined in:
lib/indextank/function.rb

#add(options = {}) ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
# File 'lib/indextank/function.rb', line 17

def add(options = {})
  raise MissingFunctionDefinition unless self.definition

  options.merge!(:definition => self.definition)
  response = @conn.put do |req|
    req.url ''
    req.body = options.to_json
  end

  true
end