Class: Coursemology::Evaluator::Models::Base

Inherits:
Flexirest::Base
  • Object
show all
Defined in:
lib/coursemology/evaluator/models/base.rb

Direct Known Subclasses

ProgrammingEvaluation

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.api_tokenObject

Returns the value of attribute api_token.



5
6
7
# File 'lib/coursemology/evaluator/models/base.rb', line 5

def api_token
  @api_token
end

.api_user_emailObject

Returns the value of attribute api_user_email.



4
5
6
# File 'lib/coursemology/evaluator/models/base.rb', line 4

def api_user_email
  @api_user_email
end

Class Method Details

.initializeObject



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/coursemology/evaluator/models/base.rb', line 7

def initialize
  Flexirest::Base.perform_caching = false
  default_config = Flexirest::Base.faraday_config
  Flexirest::Base.faraday_config do |faraday|
    # +follow_redirects+ must be added before declaring the adapter. See faraday_middleware#32,
    # last comment.
    faraday.response :follow_redirects

    default_config.call(faraday)
  end
end