Class: BeamUp::Providers::Neocities::Config
- Inherits:
-
Object
- Object
- BeamUp::Providers::Neocities::Config
- Defined in:
- lib/beam_up/providers/neocities.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#site_name ⇒ Object
Returns the value of attribute site_name.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
14 15 16 |
# File 'lib/beam_up/providers/neocities.rb', line 14 def api_key @api_key end |
#site_name ⇒ Object
Returns the value of attribute site_name.
14 15 16 |
# File 'lib/beam_up/providers/neocities.rb', line 14 def site_name @site_name end |
Class Method Details
.config_keys ⇒ Object
12 |
# File 'lib/beam_up/providers/neocities.rb', line 12 def self.config_keys = %w[api_key site_name] |
Instance Method Details
#validate! ⇒ Object
22 23 24 25 |
# File 'lib/beam_up/providers/neocities.rb', line 22 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
16 17 18 19 20 |
# File 'lib/beam_up/providers/neocities.rb', line 16 def with() self.api_key = [:api_key] self.site_name = [:site_name] self end |