Class: PDC::Config
- Inherits:
-
Struct
- Object
- Struct
- PDC::Config
- Defined in:
- lib/pdc/config.rb
Instance Attribute Summary collapse
-
#api_root ⇒ Object
Returns the value of attribute api_root.
-
#cache_store ⇒ Object
Returns the value of attribute cache_store.
-
#disable_caching ⇒ Object
Returns the value of attribute disable_caching.
-
#enable_logging ⇒ Object
Returns the value of attribute enable_logging.
-
#log_level ⇒ Object
Returns the value of attribute log_level.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#requires_token ⇒ Object
Returns the value of attribute requires_token.
-
#site ⇒ Object
Returns the value of attribute site.
-
#ssl_verify_mode ⇒ Object
Returns the value of attribute ssl_verify_mode.
-
#token ⇒ Object
Returns the value of attribute token.
-
#token_obtain_path ⇒ Object
Returns the value of attribute token_obtain_path.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/pdc/config.rb', line 35 def initialize # site config self.site = 'http://localhost:8000' self.api_root = 'rest_api/' self.ssl_verify_mode = OpenSSL::SSL::VERIFY_PEER # token and authentication self.requires_token = true self.token_obtain_path = 'v1/auth/token/obtain/' self.token = nil # logger config self.log_level = :warn self.enable_logging = true self.logger = PDC.logger self.cache_store = nil self.disable_caching = false end |
Instance Attribute Details
#api_root ⇒ Object
Returns the value of attribute api_root
22 23 24 |
# File 'lib/pdc/config.rb', line 22 def api_root @api_root end |
#cache_store ⇒ Object
Returns the value of attribute cache_store
22 23 24 |
# File 'lib/pdc/config.rb', line 22 def cache_store @cache_store end |
#disable_caching ⇒ Object
Returns the value of attribute disable_caching
22 23 24 |
# File 'lib/pdc/config.rb', line 22 def disable_caching @disable_caching end |
#enable_logging ⇒ Object
Returns the value of attribute enable_logging
22 23 24 |
# File 'lib/pdc/config.rb', line 22 def enable_logging @enable_logging end |
#log_level ⇒ Object
Returns the value of attribute log_level
22 23 24 |
# File 'lib/pdc/config.rb', line 22 def log_level @log_level end |
#logger ⇒ Object
Returns the value of attribute logger
22 23 24 |
# File 'lib/pdc/config.rb', line 22 def logger @logger end |
#requires_token ⇒ Object
Returns the value of attribute requires_token
22 23 24 |
# File 'lib/pdc/config.rb', line 22 def requires_token @requires_token end |
#site ⇒ Object
Returns the value of attribute site
22 23 24 |
# File 'lib/pdc/config.rb', line 22 def site @site end |
#ssl_verify_mode ⇒ Object
Returns the value of attribute ssl_verify_mode
22 23 24 |
# File 'lib/pdc/config.rb', line 22 def ssl_verify_mode @ssl_verify_mode end |
#token ⇒ Object
Returns the value of attribute token
22 23 24 |
# File 'lib/pdc/config.rb', line 22 def token @token end |
#token_obtain_path ⇒ Object
Returns the value of attribute token_obtain_path
22 23 24 |
# File 'lib/pdc/config.rb', line 22 def token_obtain_path @token_obtain_path end |