Class: Maglev::ProviderConfiguration
- Inherits:
-
Object
- Object
- Maglev::ProviderConfiguration
- Defined in:
- lib/maglev/provider_configuration.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#dimensions ⇒ Object
Returns the value of attribute dimensions.
-
#model ⇒ Object
Returns the value of attribute model.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(url: nil, api_key: nil, model: nil, dimensions: nil) ⇒ ProviderConfiguration
constructor
A new instance of ProviderConfiguration.
- #to_h ⇒ Object
Constructor Details
#initialize(url: nil, api_key: nil, model: nil, dimensions: nil) ⇒ ProviderConfiguration
Returns a new instance of ProviderConfiguration.
7 8 9 10 11 12 |
# File 'lib/maglev/provider_configuration.rb', line 7 def initialize(url: nil, api_key: nil, model: nil, dimensions: nil) @url = url @api_key = api_key @model = model @dimensions = dimensions end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
5 6 7 |
# File 'lib/maglev/provider_configuration.rb', line 5 def api_key @api_key end |
#dimensions ⇒ Object
Returns the value of attribute dimensions.
5 6 7 |
# File 'lib/maglev/provider_configuration.rb', line 5 def dimensions @dimensions end |
#model ⇒ Object
Returns the value of attribute model.
5 6 7 |
# File 'lib/maglev/provider_configuration.rb', line 5 def model @model end |
#url ⇒ Object
Returns the value of attribute url.
5 6 7 |
# File 'lib/maglev/provider_configuration.rb', line 5 def url @url end |
Instance Method Details
#to_h ⇒ Object
14 15 16 |
# File 'lib/maglev/provider_configuration.rb', line 14 def to_h {url: url, api_key: api_key, model: model, dimensions: dimensions}.compact end |