Class: Keymaker::ExecuteGremlinRequest

Inherits:
Request
  • Object
show all
Defined in:
lib/keymaker/requests/execute_gremlin_request.rb

Instance Attribute Summary

Attributes inherited from Request

#config, #opts, #service

Instance Method Summary collapse

Methods inherited from Request

#initialize

Constructor Details

This class inherits a constructor from Keymaker::Request

Instance Method Details

#submitObject



3
4
5
6
7
8
9
10
11
12
# File 'lib/keymaker/requests/execute_gremlin_request.rb', line 3

def submit
  service.post(full_gremlin_path, opts).on_error do |response|
    case response.status
    when (400..499)
      raise ClientError.new(response, response.body)
    when (500..599)
      raise ServerError.new(response, response.body)
    end
  end
end