Class: Bookboon::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/bookboon/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



5
6
7
# File 'lib/bookboon/config.rb', line 5

def initialize
  @language = "en"
end

Instance Attribute Details

#branding_idObject

Returns the value of attribute branding_id.



3
4
5
# File 'lib/bookboon/config.rb', line 3

def branding_id
  @branding_id
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/bookboon/config.rb', line 3

def id
  @id
end

#languageObject

Returns the value of attribute language.



3
4
5
# File 'lib/bookboon/config.rb', line 3

def language
  @language
end

#rotation_idObject

Returns the value of attribute rotation_id.



3
4
5
# File 'lib/bookboon/config.rb', line 3

def rotation_id
  @rotation_id
end

#secretObject

Returns the value of attribute secret.



3
4
5
# File 'lib/bookboon/config.rb', line 3

def secret
  @secret
end

Instance Method Details

#headersObject



9
10
11
12
13
14
15
16
17
# File 'lib/bookboon/config.rb', line 9

def headers
  _headers = {}

  _headers["Accept-Language"] = @language
  _headers["X-Bookboon-Branding"] = branding_id if branding_id
  _headers["X-Bookboon-Rotation"] = rotation_id if rotation_id

  _headers
end