Class: BeamUp::Providers::Netlify::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/beam_up/providers/netlify.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#api_tokenObject

Returns the value of attribute api_token.



14
15
16
# File 'lib/beam_up/providers/netlify.rb', line 14

def api_token
  @api_token
end

#project_idObject

Returns the value of attribute project_id.



14
15
16
# File 'lib/beam_up/providers/netlify.rb', line 14

def project_id
  @project_id
end

Class Method Details

.config_keysObject



12
# File 'lib/beam_up/providers/netlify.rb', line 12

def self.config_keys = %w[api_token project_id]

Instance Method Details

#validate!Object

Raises:



22
23
24
# File 'lib/beam_up/providers/netlify.rb', line 22

def validate!
  raise ConfigurationError, "API token must be set" unless api_token
end

#with(options) ⇒ Object



16
17
18
19
20
# File 'lib/beam_up/providers/netlify.rb', line 16

def with(options)
  self.api_token = options[:api_token]
  self.project_id = options[:project_id]
  self
end