Class: BeamUp::Providers::DigitalOceanSpaces::Config

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#access_keyObject

Returns the value of attribute access_key.



11
12
13
# File 'lib/beam_up/providers/digital_ocean_spaces.rb', line 11

def access_key
  @access_key
end

#regionObject

Returns the value of attribute region.



11
12
13
# File 'lib/beam_up/providers/digital_ocean_spaces.rb', line 11

def region
  @region
end

#secret_keyObject

Returns the value of attribute secret_key.



11
12
13
# File 'lib/beam_up/providers/digital_ocean_spaces.rb', line 11

def secret_key
  @secret_key
end

#space_nameObject

Returns the value of attribute space_name.



11
12
13
# File 'lib/beam_up/providers/digital_ocean_spaces.rb', line 11

def space_name
  @space_name
end

Class Method Details

.config_keysObject



9
# File 'lib/beam_up/providers/digital_ocean_spaces.rb', line 9

def self.config_keys = %w[access_key secret_key region space_name]

Instance Method Details

#validate!Object

Raises:



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

def validate!
  raise ConfigurationError, "Access key must be set" unless access_key
  raise ConfigurationError, "Secret key must be set" unless secret_key
end

#with(options) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/beam_up/providers/digital_ocean_spaces.rb', line 13

def with(options)
  self.access_key = options[:access_key]
  self.secret_key = options[:secret_key]
  self.region = options[:region]
  self.space_name = options[:space_name]
  self
end