Class: Nesta::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/nesta-plugin-metadata-extensions/init.rb

Class Method Summary collapse

Class Method Details

.supportObject

expose any definitions of a support contact



12
13
14
15
16
17
18
19
# File 'lib/nesta-plugin-metadata-extensions/init.rb', line 12

def self.support
  environment_config = {}
  %w[name uri email].each do |setting|
    variable = "NESTA_SUPPORT__#{setting.upcase}"
    ENV[variable] && environment_config[setting] = ENV[variable]
  end
  environment_config.empty? ? from_yaml("support") : environment_config
end