Class: Bookboon::Config
- Inherits:
-
Object
- Object
- Bookboon::Config
- Defined in:
- lib/bookboon/config.rb
Instance Attribute Summary collapse
-
#branding_id ⇒ Object
Returns the value of attribute branding_id.
-
#id ⇒ Object
Returns the value of attribute id.
-
#language ⇒ Object
Returns the value of attribute language.
-
#rotation_id ⇒ Object
Returns the value of attribute rotation_id.
-
#secret ⇒ Object
Returns the value of attribute secret.
Instance Method Summary collapse
- #headers ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
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_id ⇒ Object
Returns the value of attribute branding_id.
3 4 5 |
# File 'lib/bookboon/config.rb', line 3 def branding_id @branding_id end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/bookboon/config.rb', line 3 def id @id end |
#language ⇒ Object
Returns the value of attribute language.
3 4 5 |
# File 'lib/bookboon/config.rb', line 3 def language @language end |
#rotation_id ⇒ Object
Returns the value of attribute rotation_id.
3 4 5 |
# File 'lib/bookboon/config.rb', line 3 def rotation_id @rotation_id end |
#secret ⇒ Object
Returns the value of attribute secret.
3 4 5 |
# File 'lib/bookboon/config.rb', line 3 def secret @secret end |
Instance Method Details
#headers ⇒ Object
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 |