Class: Puppet::Util::RunMode
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(name) ⇒ RunMode
Returns a new instance of RunMode.
8
9
10
|
# File 'lib/puppet/util/run_mode.rb', line 8
def initialize(name)
@name = name.to_sym
end
|
Instance Attribute Details
Returns the value of attribute name.
12
13
14
|
# File 'lib/puppet/util/run_mode.rb', line 12
def name
@name
end
|
Instance Method Details
#agent? ⇒ Boolean
31
32
33
|
# File 'lib/puppet/util/run_mode.rb', line 31
def agent?
name == :agent
end
|
43
44
45
|
# File 'lib/puppet/util/run_mode.rb', line 43
def log_dir
RunMode[name].log_dir
end
|
#master? ⇒ Boolean
27
28
29
|
# File 'lib/puppet/util/run_mode.rb', line 27
def master?
name == :master || name == :server
end
|
39
40
41
|
# File 'lib/puppet/util/run_mode.rb', line 39
def run_dir
RunMode[name].run_dir
end
|
#server? ⇒ Boolean
23
24
25
|
# File 'lib/puppet/util/run_mode.rb', line 23
def server?
name == :master || name == :server
end
|
#user? ⇒ Boolean
35
36
37
|
# File 'lib/puppet/util/run_mode.rb', line 35
def user?
name == :user
end
|