Method: NaviClient::Cloud#initialize

Defined in:
lib/cloud/navi_cloud_client.rb

#initialize(sso_web_url = ENV['api_url'], env = Rails.env) ⇒ Cloud

Returns a new instance of Cloud.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/cloud/navi_cloud_client.rb', line 16

def initialize(sso_web_url = ENV['api_url'], env = Rails.env)
  super()

  # client-id used to track the process
  @id = SecureRandom.uuid

  # flag to print Ruby library debug info (very detailed)
  @net_imap_debug = false

  # flag to mark email as read after gets downloaded.
  @mark_as_read = false
  # flag to turn on/off debug mode.
  @debug = false

  @logger = nil

  # sso_web (authentication) config.
  @sso_web_url = sso_web_url
  # authentication token received from sso_web used to authenticate the request to database_api
  @token = nil

  # client_type
  @client_type = "cloud"

  @download_path = config[:s3_download_folder] + '/'

  # set email_address of current_user for s3 folder name
  @current_user_email = nil
  @env = env
end