diff options
Diffstat (limited to 'lib/puppet/util')
-rw-r--r-- | lib/puppet/util/run_mode.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/puppet/util/run_mode.rb b/lib/puppet/util/run_mode.rb index 08f2c851f..029c1f921 100644 --- a/lib/puppet/util/run_mode.rb +++ b/lib/puppet/util/run_mode.rb @@ -5,8 +5,14 @@ module Puppet @name = name.to_sym end + @@run_modes = Hash.new {|h, k| h[k] = RunMode.new(k)} + attr :name + def self.[](name) + @@run_modes[name] + end + def master? name == :master end |