Class: PipelineDealsApi::Credentials
- Inherits:
-
Object
- Object
- PipelineDealsApi::Credentials
- Defined in:
- lib/pipeline_deals_api/credentials.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
-
#app_key ⇒ Object
readonly
Returns the value of attribute app_key.
Instance Method Summary collapse
-
#initialize(api_key:, app_key: nil) ⇒ Credentials
constructor
A new instance of Credentials.
- #valid? ⇒ Boolean
Constructor Details
#initialize(api_key:, app_key: nil) ⇒ Credentials
Returns a new instance of Credentials.
5 6 7 8 |
# File 'lib/pipeline_deals_api/credentials.rb', line 5 def initialize(api_key:, app_key: nil) @api_key = api_key.freeze @app_key = app_key.freeze end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
3 4 5 |
# File 'lib/pipeline_deals_api/credentials.rb', line 3 def api_key @api_key end |
#app_key ⇒ Object (readonly)
Returns the value of attribute app_key.
3 4 5 |
# File 'lib/pipeline_deals_api/credentials.rb', line 3 def app_key @app_key end |
Instance Method Details
#valid? ⇒ Boolean
10 11 12 |
# File 'lib/pipeline_deals_api/credentials.rb', line 10 def valid? api_key.present? end |