Class: EasyManageClient::Configuration
- Inherits:
-
Object
- Object
- EasyManageClient::Configuration
- Defined in:
- lib/easy_manage_client/configuration.rb
Overview
Configuration class
Constant Summary collapse
- EXTENSION_TYPES =
%w[yaml json].freeze
- FILE_EXTENSION_TYPES =
{ 'yaml' => 'yml', 'json' => 'json' }.freeze
Instance Attribute Summary collapse
-
#auth_token ⇒ Object
Returns the value of attribute auth_token.
-
#compile_id ⇒ Object
Returns the value of attribute compile_id.
-
#download_folder ⇒ Object
Returns the value of attribute download_folder.
-
#extension ⇒ Object
Returns the value of attribute extension.
-
#profile ⇒ Object
Returns the value of attribute profile.
-
#root_url ⇒ Object
Returns the value of attribute root_url.
Instance Method Summary collapse
- #check! ⇒ Object
- #file_extension ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
49 50 51 52 |
# File 'lib/easy_manage_client/configuration.rb', line 49 def initialize self.profile = :default self.extension = 'yaml' end |
Instance Attribute Details
#auth_token ⇒ Object
Returns the value of attribute auth_token.
46 47 48 |
# File 'lib/easy_manage_client/configuration.rb', line 46 def auth_token @auth_token end |
#compile_id ⇒ Object
Returns the value of attribute compile_id.
46 47 48 |
# File 'lib/easy_manage_client/configuration.rb', line 46 def compile_id @compile_id end |
#download_folder ⇒ Object
Returns the value of attribute download_folder.
46 47 48 |
# File 'lib/easy_manage_client/configuration.rb', line 46 def download_folder @download_folder end |
#extension ⇒ Object
Returns the value of attribute extension.
46 47 48 |
# File 'lib/easy_manage_client/configuration.rb', line 46 def extension @extension end |
#profile ⇒ Object
Returns the value of attribute profile.
46 47 48 |
# File 'lib/easy_manage_client/configuration.rb', line 46 def profile @profile end |
#root_url ⇒ Object
Returns the value of attribute root_url.
46 47 48 |
# File 'lib/easy_manage_client/configuration.rb', line 46 def root_url @root_url end |
Instance Method Details
#check! ⇒ Object
58 59 60 |
# File 'lib/easy_manage_client/configuration.rb', line 58 def check! raise InvalidExtension unless EXTENSION_TYPES.include?(extension) end |
#file_extension ⇒ Object
54 55 56 |
# File 'lib/easy_manage_client/configuration.rb', line 54 def file_extension FILE_EXTENSION_TYPES[extension] end |