Class: BeamUp::Providers::Statichost::Config

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



15
16
17
# File 'lib/beam_up/providers/statichost.rb', line 15

def api_key
  @api_key
end

#builder_hostObject

Returns the value of attribute builder_host.



15
16
17
# File 'lib/beam_up/providers/statichost.rb', line 15

def builder_host
  @builder_host
end

#site_nameObject

Returns the value of attribute site_name.



15
16
17
# File 'lib/beam_up/providers/statichost.rb', line 15

def site_name
  @site_name
end

Class Method Details

.config_keysObject



13
# File 'lib/beam_up/providers/statichost.rb', line 13

def self.config_keys = %w[api_key site_name builder_host]

Instance Method Details

#validate!Object

Raises:



23
24
25
26
# File 'lib/beam_up/providers/statichost.rb', line 23

def validate!
  raise ConfigurationError, "API key must be set" unless api_key
  raise ConfigurationError, "Site name must be set" unless site_name
end

#with(options) ⇒ Object



17
18
19
20
21
# File 'lib/beam_up/providers/statichost.rb', line 17

def with(options)
  self.api_key = options[:api_key]
  self.site_name = options[:site_name]
  self
end