Class: InventosStreak::Configuration
- Inherits:
-
Object
- Object
- InventosStreak::Configuration
- Defined in:
- lib/inventos_streak/configuration.rb
Instance Attribute Summary collapse
- #basic_auth ⇒ Object
-
#streak_api_key ⇒ Object
Returns the value of attribute streak_api_key.
-
#streak_base_url ⇒ Object
Returns the value of attribute streak_base_url.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 8 |
# File 'lib/inventos_streak/configuration.rb', line 5 def initialize @streak_api_key ||= ENV['STREAK_API_KEY'] @streak_base_url ||= ENV['STREAK_BASE_URL'] end |
Instance Attribute Details
#basic_auth ⇒ Object
10 11 12 13 14 15 |
# File 'lib/inventos_streak/configuration.rb', line 10 def basic_auth @basic_auth ||= { username: @streak_api_key, password: nil } end |
#streak_api_key ⇒ Object
Returns the value of attribute streak_api_key.
2 3 4 |
# File 'lib/inventos_streak/configuration.rb', line 2 def streak_api_key @streak_api_key end |
#streak_base_url ⇒ Object
Returns the value of attribute streak_base_url.
2 3 4 |
# File 'lib/inventos_streak/configuration.rb', line 2 def streak_base_url @streak_base_url end |