Class: Puppet::Settings::ValuesFromSection
- Defined in:
- lib/puppet/settings.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #include?(name) ⇒ Boolean
-
#initialize(name, section) ⇒ ValuesFromSection
constructor
A new instance of ValuesFromSection.
- #inspect ⇒ Object
- #lookup(name) ⇒ Object
Constructor Details
#initialize(name, section) ⇒ ValuesFromSection
Returns a new instance of ValuesFromSection.
1402 1403 1404 1405 |
# File 'lib/puppet/settings.rb', line 1402 def initialize(name, section) @name = name @section = section end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
1400 1401 1402 |
# File 'lib/puppet/settings.rb', line 1400 def name @name end |
Instance Method Details
#include?(name) ⇒ Boolean
1407 1408 1409 |
# File 'lib/puppet/settings.rb', line 1407 def include?(name) !@section.setting(name).nil? end |
#inspect ⇒ Object
1418 1419 1420 |
# File 'lib/puppet/settings.rb', line 1418 def inspect %Q{<#{self.class}:#{self.object_id} @name="#{@name}" @section="#{@section}">} end |
#lookup(name) ⇒ Object
1411 1412 1413 1414 1415 1416 |
# File 'lib/puppet/settings.rb', line 1411 def lookup(name) setting = @section.setting(name) if setting setting.value end end |