Module: Eson::HTTP::Index

Extended by:
API
Includes:
Shared::Index
Defined in:
lib/eson/http/core/index.rb

Instance Method Summary collapse

Instance Method Details

#pathObject



9
10
11
12
13
14
15
# File 'lib/eson/http/core/index.rb', line 9

def path
  if id
    "/{index}/{type}/{id}"
  else
    "/{index}/{type}"
  end
end

#request_methodObject



17
18
19
20
21
22
23
# File 'lib/eson/http/core/index.rb', line 17

def request_method
  if id
    :put
  else
    :post
  end
end