Method: Middleman::Extension.expose_to_config
- Defined in:
- lib/middleman-core/extension.rb
.expose_to_config(*symbols)
This method returns an undefined value.
Takes a method within this extension and exposes it inside the scope of the config.rb sandbox.
228 229 230 231 232 233 234 235 236 237 238 |
# File 'lib/middleman-core/extension.rb', line 228 def expose_to_config(*symbols) self.exposed_to_config ||= {} if symbols.first && symbols.first.is_a?(Hash) self.exposed_to_config.merge!(symbols.first) elsif symbols.is_a? Array symbols.each do |sym| self.exposed_to_config[sym] = sym end end end |