Class: Wordsmith::Configuration
- Inherits:
-
Object
- Object
- Wordsmith::Configuration
- Defined in:
- lib/wordsmith/configuration.rb
Constant Summary collapse
- DEFAULT_VERSION =
'1'
- DEFAULT_USER_AGENT =
"RubySDK/#{Wordsmith::VERSION}"
- URL_HOST =
'https://api.automatedinsights.com'
- DEFAULT_URL =
"#{URL_HOST}/v#{DEFAULT_VERSION}"
Instance Attribute Summary collapse
-
#token ⇒ Object
Returns the value of attribute token.
-
#user_agent ⇒ Object
Returns the value of attribute user_agent.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #url ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
9 10 11 12 |
# File 'lib/wordsmith/configuration.rb', line 9 def initialize @version = DEFAULT_VERSION @user_agent = DEFAULT_USER_AGENT end |
Instance Attribute Details
#token ⇒ Object
Returns the value of attribute token.
3 4 5 |
# File 'lib/wordsmith/configuration.rb', line 3 def token @token end |
#user_agent ⇒ Object
Returns the value of attribute user_agent.
3 4 5 |
# File 'lib/wordsmith/configuration.rb', line 3 def user_agent @user_agent end |
#version ⇒ Object
Returns the value of attribute version.
3 4 5 |
# File 'lib/wordsmith/configuration.rb', line 3 def version @version end |
Instance Method Details
#url ⇒ Object
14 15 16 |
# File 'lib/wordsmith/configuration.rb', line 14 def url "#{URL_HOST}/v#{version}" end |