Class: EasyManageClient::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/easy_manage_client/configuration.rb

Overview

Configuration class

Constant Summary collapse

EXTENSION_TYPES =
%w[yml json].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



48
49
50
51
# File 'lib/easy_manage_client/configuration.rb', line 48

def initialize
  self.profile = :default
  self.extension = 'yml'
end

Instance Attribute Details

#auth_tokenObject

Returns the value of attribute auth_token.



45
46
47
# File 'lib/easy_manage_client/configuration.rb', line 45

def auth_token
  @auth_token
end

#compile_idObject

Returns the value of attribute compile_id.



45
46
47
# File 'lib/easy_manage_client/configuration.rb', line 45

def compile_id
  @compile_id
end

#download_folderObject

Returns the value of attribute download_folder.



45
46
47
# File 'lib/easy_manage_client/configuration.rb', line 45

def download_folder
  @download_folder
end

#extensionObject

Returns the value of attribute extension.



45
46
47
# File 'lib/easy_manage_client/configuration.rb', line 45

def extension
  @extension
end

#profileObject

Returns the value of attribute profile.



45
46
47
# File 'lib/easy_manage_client/configuration.rb', line 45

def profile
  @profile
end

#root_urlObject

Returns the value of attribute root_url.



45
46
47
# File 'lib/easy_manage_client/configuration.rb', line 45

def root_url
  @root_url
end

Instance Method Details

#check!Object

Raises:



53
54
55
# File 'lib/easy_manage_client/configuration.rb', line 53

def check!
  raise InvalidExtension unless EXTENSION_TYPES.include?(extension)
end