Sha256: ca96492f1315f9aecb888eb9f8f127bb8220337c676503d70f833c02f289f01c
Contents?: true
Size: 756 Bytes
Versions: 2
Compression:
Stored size: 756 Bytes
Contents
module Typus module Configuration # Read configuration from <tt>config/typus/*.yml</tt>. def self.models! @@config = {} Typus.model_configuration_files.each do |file| if data = YAML::load_file(file) @@config.merge!(data) end end end mattr_accessor :config @@config = {} # Read roles from files <tt>config/typus/*_roles.yml</tt>. def self.roles! @@roles = {} Typus.role_configuration_files.each do |file| if data = YAML::load_file(file) data.compact.each do |key, value| @@roles[key] ? @@roles[key].merge!(value) : (@@roles[key] = value) end end end end mattr_accessor :roles @@roles = {} end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
typus-3.1.0 | lib/typus/configuration.rb |
typus-3.1.0.rc19 | lib/typus/configuration.rb |