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
1492 1493 1494 1495 |
# File 'lib/puppet/settings.rb', line 1492 def initialize(name, section) @name = name @section = section end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
1490 1491 1492 |
# File 'lib/puppet/settings.rb', line 1490 def name @name end |
Instance Method Details
#include?(name) ⇒ Boolean
1497 1498 1499 |
# File 'lib/puppet/settings.rb', line 1497 def include?(name) !@section.setting(name).nil? end |
#inspect ⇒ Object
1508 1509 1510 |
# File 'lib/puppet/settings.rb', line 1508 def inspect %Q{<#{self.class}:#{self.object_id} @name="#{@name}" @section="#{@section}">} end |
#lookup(name) ⇒ Object
1501 1502 1503 1504 1505 1506 |
# File 'lib/puppet/settings.rb', line 1501 def lookup(name) setting = @section.setting(name) if setting setting.value end end |