Class: PipelineDealsApi::Credentials

Inherits:
Object
  • Object
show all
Defined in:
lib/pipeline_deals_api/credentials.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_keyObject (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_keyObject (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

Returns:

  • (Boolean)


10
11
12
# File 'lib/pipeline_deals_api/credentials.rb', line 10

def valid?
  api_key.present?
end