Class: OrionX::Configuration
- Inherits:
-
Object
- Object
- OrionX::Configuration
- Defined in:
- lib/orionx/configuration.rb
Instance Attribute Summary collapse
-
#api_endpoint ⇒ Object
Returns the value of attribute api_endpoint.
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#api_secret ⇒ Object
Returns the value of attribute api_secret.
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#retries ⇒ Object
Returns the value of attribute retries.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
- #debug? ⇒ Boolean
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #valid? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 10 11 12 13 14 15 |
# File 'lib/orionx/configuration.rb', line 7 def initialize @api_key = nil @api_secret = nil @api_endpoint = "https://api2.orionx.com/graphql" @debug = false @logger = nil @timeout = 30 @retries = 3 end |
Instance Attribute Details
#api_endpoint ⇒ Object
Returns the value of attribute api_endpoint.
5 6 7 |
# File 'lib/orionx/configuration.rb', line 5 def api_endpoint @api_endpoint end |
#api_key ⇒ Object
Returns the value of attribute api_key.
5 6 7 |
# File 'lib/orionx/configuration.rb', line 5 def api_key @api_key end |
#api_secret ⇒ Object
Returns the value of attribute api_secret.
5 6 7 |
# File 'lib/orionx/configuration.rb', line 5 def api_secret @api_secret end |
#debug ⇒ Object
Returns the value of attribute debug.
5 6 7 |
# File 'lib/orionx/configuration.rb', line 5 def debug @debug end |
#logger ⇒ Object
Returns the value of attribute logger.
5 6 7 |
# File 'lib/orionx/configuration.rb', line 5 def logger @logger end |
#retries ⇒ Object
Returns the value of attribute retries.
5 6 7 |
# File 'lib/orionx/configuration.rb', line 5 def retries @retries end |
#timeout ⇒ Object
Returns the value of attribute timeout.
5 6 7 |
# File 'lib/orionx/configuration.rb', line 5 def timeout @timeout end |
Instance Method Details
#debug? ⇒ Boolean
25 26 27 |
# File 'lib/orionx/configuration.rb', line 25 def debug? @debug end |
#valid? ⇒ Boolean
17 18 19 |
# File 'lib/orionx/configuration.rb', line 17 def valid? !api_key.nil? && !api_secret.nil? && !api_endpoint.nil? end |