class Client

Attributes

client_secret_key[RW]

Public Class Methods

new(client_secret_key) click to toggle source
# File lib/hackerearth_api/client.rb, line 11
def initialize(client_secret_key)
        if client_secret_key == nil
                raise(ExceptionHandler::InvalidParameterException, Message.client_secret_nil)
        end
        @client_secret_key = client_secret_key
end

Public Instance Methods

compile(params) click to toggle source

compiles the code of the current object params must be a hash

# File lib/hackerearth_api/client.rb, line 20
def compile(params)
        filtered_parameters = CompileParameters.get_params(params)
        filtered_parameters[:client_secret] = @client_secret_key
        Response.compile(filtered_parameters) 
end
run(params) click to toggle source

run the code of the current object params must be a hash

# File lib/hackerearth_api/client.rb, line 28
def run(params)
        filtered_parameters = RunParameters.get_params(params)
        filtered_parameters[:client_secret] = @client_secret_key
        Response.run(filtered_parameters)
end