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.
1561 1562 1563 1564 |
# File 'lib/puppet/settings.rb', line 1561 def initialize(name, section) @name = name @section = section end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
1559 1560 1561 |
# File 'lib/puppet/settings.rb', line 1559 def name @name end |
Instance Method Details
#include?(name) ⇒ Boolean
1566 1567 1568 |
# File 'lib/puppet/settings.rb', line 1566 def include?(name) !@section.setting(name).nil? end |
#inspect ⇒ Object
1577 1578 1579 |
# File 'lib/puppet/settings.rb', line 1577 def inspect %Q{<#{self.class}:#{self.object_id} @name="#{@name}" @section="#{@section}">} end |
#lookup(name) ⇒ Object
1570 1571 1572 1573 1574 1575 |
# File 'lib/puppet/settings.rb', line 1570 def lookup(name) setting = @section.setting(name) if setting setting.value end end |