Class: Hubspot::Config
Overview
To hold Hubspot configuration
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#client_secret ⇒ Object
Returns the value of attribute client_secret.
-
#log_level ⇒ Object
Returns the value of attribute log_level.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
-
#portal_id ⇒ Object
Returns the value of attribute portal_id.
-
#read_timeout ⇒ Object
Returns the value of attribute read_timeout.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#write_timeout ⇒ Object
Returns the value of attribute write_timeout.
Instance Method Summary collapse
-
#apply_log_level ⇒ Object
Apply the log level to the logger.
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
9 10 11 12 13 14 15 16 |
# File 'lib/hubspot/config.rb', line 9 def initialize @access_token = nil @portal_id = nil @client_secret = nil @logger = initialize_logger @log_level = determine_log_level apply_log_level end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
6 7 8 |
# File 'lib/hubspot/config.rb', line 6 def access_token @access_token end |
#client_secret ⇒ Object
Returns the value of attribute client_secret.
6 7 8 |
# File 'lib/hubspot/config.rb', line 6 def client_secret @client_secret end |
#log_level ⇒ Object
Returns the value of attribute log_level.
6 7 8 |
# File 'lib/hubspot/config.rb', line 6 def log_level @log_level end |
#logger ⇒ Object
Returns the value of attribute logger.
6 7 8 |
# File 'lib/hubspot/config.rb', line 6 def logger @logger end |
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
6 7 8 |
# File 'lib/hubspot/config.rb', line 6 def open_timeout @open_timeout end |
#portal_id ⇒ Object
Returns the value of attribute portal_id.
6 7 8 |
# File 'lib/hubspot/config.rb', line 6 def portal_id @portal_id end |
#read_timeout ⇒ Object
Returns the value of attribute read_timeout.
6 7 8 |
# File 'lib/hubspot/config.rb', line 6 def read_timeout @read_timeout end |
#timeout ⇒ Object
Returns the value of attribute timeout.
6 7 8 |
# File 'lib/hubspot/config.rb', line 6 def timeout @timeout end |
#write_timeout ⇒ Object
Returns the value of attribute write_timeout.
6 7 8 |
# File 'lib/hubspot/config.rb', line 6 def write_timeout @write_timeout end |
Instance Method Details
#apply_log_level ⇒ Object
Apply the log level to the logger
19 20 21 |
# File 'lib/hubspot/config.rb', line 19 def apply_log_level @logger.level = @log_level end |