Class: CodewarsCli::Deferred

Inherits:
Object
  • Object
show all
Includes:
GenericHelpers
Defined in:
lib/codewars_cli/deferred.rb

Constant Summary collapse

REQUEST_TIMES =
10

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from GenericHelpers

#check_for_api_key, #error, #extend_object, included, #info, #presenter

Constructor Details

#initialize(kata_name, language, response, client) ⇒ Deferred

Returns a new instance of Deferred.



6
7
8
9
10
11
12
13
14
15
# File 'lib/codewars_cli/deferred.rb', line 6

def initialize(kata_name, language, response, client)
  @kata_name = kata_name
  @language = language
  @response = response
  @client = client
  _read_deferred do
    info('Your solution has been uploaded waiting for results')
    _handle_deferred_response(_handle_deferred)
  end
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



5
6
7
# File 'lib/codewars_cli/deferred.rb', line 5

def client
  @client
end

#kata_nameObject (readonly)

Returns the value of attribute kata_name.



5
6
7
# File 'lib/codewars_cli/deferred.rb', line 5

def kata_name
  @kata_name
end

#languageObject (readonly)

Returns the value of attribute language.



5
6
7
# File 'lib/codewars_cli/deferred.rb', line 5

def language
  @language
end

#responseObject (readonly)

Returns the value of attribute response.



5
6
7
# File 'lib/codewars_cli/deferred.rb', line 5

def response
  @response
end