Files
news.gitea.happylizard.me/bin/gems/yell-2.2.2/lib/yell/configuration.rb
T
pizza2d1 4cee170d66
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s
Add bin and edit workflow
2026-09-16 13:11:16 -06:00

24 lines
468 B
Ruby

require 'erb'
require 'yaml'
module Yell #:nodoc:
# The Configuration can be used to setup Yell before
# initializing an instance.
class Configuration
def self.load!( file )
yaml = YAML.load( ERB.new(File.read(file)).result )
# in case we have ActiveSupport
if defined?(ActiveSupport::HashWithIndifferentAccess)
yaml = ActiveSupport::HashWithIndifferentAccess.new(yaml)
end
yaml[Yell.env] || {}
end
end
end