Class: Warb::Configuration
- Inherits:
-
Object
- Object
- Warb::Configuration
- Defined in:
- lib/warb/configuration.rb
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#adapter ⇒ Object
Returns the value of attribute adapter.
-
#business_id ⇒ Object
Returns the value of attribute business_id.
-
#custom_errors ⇒ Object
Returns the value of attribute custom_errors.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#sender_id ⇒ Object
Returns the value of attribute sender_id.
Instance Method Summary collapse
-
#initialize(access_token: nil, sender_id: nil, business_id: nil, adapter: nil, logger: nil) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(access_token: nil, sender_id: nil, business_id: nil, adapter: nil, logger: nil) ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 10 11 12 13 14 |
# File 'lib/warb/configuration.rb', line 7 def initialize(access_token: nil, sender_id: nil, business_id: nil, adapter: nil, logger: nil) @access_token = access_token @sender_id = sender_id @business_id = business_id @adapter = adapter || Faraday.default_adapter @logger = logger || Logger.new($stdout) @custom_errors = CustomErrors.new.build end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
5 6 7 |
# File 'lib/warb/configuration.rb', line 5 def access_token @access_token end |
#adapter ⇒ Object
Returns the value of attribute adapter.
5 6 7 |
# File 'lib/warb/configuration.rb', line 5 def adapter @adapter end |
#business_id ⇒ Object
Returns the value of attribute business_id.
5 6 7 |
# File 'lib/warb/configuration.rb', line 5 def business_id @business_id end |
#custom_errors ⇒ Object
Returns the value of attribute custom_errors.
5 6 7 |
# File 'lib/warb/configuration.rb', line 5 def custom_errors @custom_errors end |
#logger ⇒ Object
Returns the value of attribute logger.
5 6 7 |
# File 'lib/warb/configuration.rb', line 5 def logger @logger end |
#sender_id ⇒ Object
Returns the value of attribute sender_id.
5 6 7 |
# File 'lib/warb/configuration.rb', line 5 def sender_id @sender_id end |