Class: Brazify::Configuration
- Inherits:
-
Object
- Object
- Brazify::Configuration
- Defined in:
- lib/brazify/configuration.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#base_url ⇒ Object
readonly
Returns the value of attribute base_url.
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#open_timeout ⇒ Object
readonly
Returns the value of attribute open_timeout.
-
#timeout ⇒ Object
readonly
Returns the value of attribute timeout.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
16 17 18 19 20 21 22 23 |
# File 'lib/brazify/configuration.rb', line 16 def initialize @base_url = 'https://rest.fra-01.braze.eu/' @format = :json @method = :get @timeout = 30 @open_timeout = 30 end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
3 4 5 |
# File 'lib/brazify/configuration.rb', line 3 def api_key @api_key end |
#base_url ⇒ Object (readonly)
Returns the value of attribute base_url.
4 5 6 |
# File 'lib/brazify/configuration.rb', line 4 def base_url @base_url end |
#format ⇒ Object (readonly)
Returns the value of attribute format.
4 5 6 |
# File 'lib/brazify/configuration.rb', line 4 def format @format end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
4 5 6 |
# File 'lib/brazify/configuration.rb', line 4 def method @method end |
#open_timeout ⇒ Object (readonly)
Returns the value of attribute open_timeout.
4 5 6 |
# File 'lib/brazify/configuration.rb', line 4 def open_timeout @open_timeout end |
#timeout ⇒ Object (readonly)
Returns the value of attribute timeout.
4 5 6 |
# File 'lib/brazify/configuration.rb', line 4 def timeout @timeout end |
Class Method Details
.setup ⇒ Object
10 11 12 13 14 |
# File 'lib/brazify/configuration.rb', line 10 def self.setup new.tap do |instance| yield(instance) if block_given? end end |