Class: BeamUp::Providers::Bunny::Config

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#regionObject

Returns the value of attribute region.



12
13
14
# File 'lib/beam_up/providers/bunny.rb', line 12

def region
  @region
end

#storage_zone_nameObject

Returns the value of attribute storage_zone_name.



12
13
14
# File 'lib/beam_up/providers/bunny.rb', line 12

def storage_zone_name
  @storage_zone_name
end

#storage_zone_passwordObject

Returns the value of attribute storage_zone_password.



12
13
14
# File 'lib/beam_up/providers/bunny.rb', line 12

def storage_zone_password
  @storage_zone_password
end

Class Method Details

.config_keysObject



10
# File 'lib/beam_up/providers/bunny.rb', line 10

def self.config_keys = %w[storage_zone_password storage_zone_name region]

Instance Method Details

#validate!Object

Raises:



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

def validate!
  raise ConfigurationError, "Storage zone password must be set" unless storage_zone_password
  raise ConfigurationError, "Storage zone name must be set" unless storage_zone_name
end

#with(options) ⇒ Object



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

def with(options)
  self.storage_zone_password = options[:storage_zone_password]
  self.storage_zone_name = options[:storage_zone_name]
  self.region = options[:region] || "de"
  self
end