Class: Viberroo::Configuration
- Inherits:
-
Object
- Object
- Viberroo::Configuration
- Defined in:
- lib/viberroo/configuration.rb
Overview
Stores runtime configuration information.
Instance Attribute Summary collapse
-
#auth_token ⇒ String
Stores Viber API authentication token.
-
#logger ⇒ Logger
Specifies logger.
-
#parse_response_body ⇒ true || false
Specifies whether to parse response body of Bot requests.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
52 53 54 55 56 57 58 59 60 61 |
# File 'lib/viberroo/configuration.rb', line 52 def initialize @auth_token = nil @logger = Logger.new(STDOUT) @logger.formatter = proc do |severity, datetime, _, msg| "[#{datetime}] #{severity} Viberroo::Bot #{msg}\n" end @parse_response_body = true end |
Instance Attribute Details
#auth_token ⇒ String
Stores Viber API authentication token. Necessary for the bot to send API requests.
42 43 44 |
# File 'lib/viberroo/configuration.rb', line 42 def auth_token @auth_token end |
#logger ⇒ Logger
Specifies logger.
33 34 35 |
# File 'lib/viberroo/configuration.rb', line 33 def logger @logger end |
#parse_response_body ⇒ true || false
Specifies whether to parse response body of Bot requests.
50 51 52 |
# File 'lib/viberroo/configuration.rb', line 50 def parse_response_body @parse_response_body end |