Method: Nugrant::Config.convert
- Defined in:
- lib/nugrant/config.rb
.convert(config = {}) ⇒ Object
Convenience method to easily accept either a hash that will be converted to a Nugrant::Config object or directly a config object.
24 25 26 |
# File 'lib/nugrant/config.rb', line 24 def self.convert(config = {}) return config.kind_of?(Nugrant::Config) ? config : Nugrant::Config.new(config) end |