Class: Brazify::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/brazify/configuration.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_keyObject

Returns the value of attribute api_key.



3
4
5
# File 'lib/brazify/configuration.rb', line 3

def api_key
  @api_key
end

#base_urlObject (readonly)

Returns the value of attribute base_url.



4
5
6
# File 'lib/brazify/configuration.rb', line 4

def base_url
  @base_url
end

#formatObject (readonly)

Returns the value of attribute format.



4
5
6
# File 'lib/brazify/configuration.rb', line 4

def format
  @format
end

#methodObject (readonly)

Returns the value of attribute method.



4
5
6
# File 'lib/brazify/configuration.rb', line 4

def method
  @method
end

#open_timeoutObject (readonly)

Returns the value of attribute open_timeout.



4
5
6
# File 'lib/brazify/configuration.rb', line 4

def open_timeout
  @open_timeout
end

#timeoutObject (readonly)

Returns the value of attribute timeout.



4
5
6
# File 'lib/brazify/configuration.rb', line 4

def timeout
  @timeout
end

Class Method Details

.setupObject



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