Class: TensorBuzz::Api::Configuration
- Inherits:
-
Object
- Object
- TensorBuzz::Api::Configuration
- Defined in:
- lib/tensorbuzz/api/configuration.rb
Instance Attribute Summary collapse
-
#auth_token ⇒ Object
Returns the value of attribute auth_token.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#hostname ⇒ Object
Returns the value of attribute hostname.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
-
#post_url ⇒ Object
Returns the value of attribute post_url.
-
#project_id ⇒ Object
Returns the value of attribute project_id.
-
#read_timeout ⇒ Object
Returns the value of attribute read_timeout.
-
#release ⇒ Object
Returns the value of attribute release.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #validate! ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
9 10 11 12 13 |
# File 'lib/tensorbuzz/api/configuration.rb', line 9 def initialize @open_timeout = 2 @post_url = 'https://server.tensorbuzz.com/errors/reports' @read_timeout = 5 end |
Instance Attribute Details
#auth_token ⇒ Object
Returns the value of attribute auth_token.
6 7 8 |
# File 'lib/tensorbuzz/api/configuration.rb', line 6 def auth_token @auth_token end |
#environment ⇒ Object
Returns the value of attribute environment.
6 7 8 |
# File 'lib/tensorbuzz/api/configuration.rb', line 6 def environment @environment end |
#hostname ⇒ Object
Returns the value of attribute hostname.
6 7 8 |
# File 'lib/tensorbuzz/api/configuration.rb', line 6 def hostname @hostname end |
#logger ⇒ Object
Returns the value of attribute logger.
6 7 8 |
# File 'lib/tensorbuzz/api/configuration.rb', line 6 def logger @logger end |
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
6 7 8 |
# File 'lib/tensorbuzz/api/configuration.rb', line 6 def open_timeout @open_timeout end |
#post_url ⇒ Object
Returns the value of attribute post_url.
6 7 8 |
# File 'lib/tensorbuzz/api/configuration.rb', line 6 def post_url @post_url end |
#project_id ⇒ Object
Returns the value of attribute project_id.
6 7 8 |
# File 'lib/tensorbuzz/api/configuration.rb', line 6 def project_id @project_id end |
#read_timeout ⇒ Object
Returns the value of attribute read_timeout.
6 7 8 |
# File 'lib/tensorbuzz/api/configuration.rb', line 6 def read_timeout @read_timeout end |
#release ⇒ Object
Returns the value of attribute release.
6 7 8 |
# File 'lib/tensorbuzz/api/configuration.rb', line 6 def release @release end |
Instance Method Details
#validate! ⇒ Object
15 16 17 18 |
# File 'lib/tensorbuzz/api/configuration.rb', line 15 def validate! raise ArgumentError, 'TensorBuzz auth_token is required' if auth_token.to_s.empty? raise ArgumentError, 'TensorBuzz project_id is required' if project_id.to_s.empty? end |