lib/vidar/config.rb in vidar-0.1.5 vs lib/vidar/config.rb in vidar-0.1.6

- old
+ new

@@ -28,10 +28,16 @@ @loaded end def get(key) load unless loaded? - @data[key.to_s] || DEFAULT_OPTIONS[key.to_sym]&.call || fail(MissingConfigError, key) + value = @data[key.to_s] || DEFAULT_OPTIONS[key.to_sym]&.call + Vidar::Interpolation.call(value, self) + end + + def get!(key) + load unless loaded? + get(key) || fail(MissingConfigError, key) end end end end