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.
1587 1588 1589 1590 |
# File 'lib/puppet/settings.rb', line 1587 def initialize(name, section) @name = name @section = section end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
1585 1586 1587 |
# File 'lib/puppet/settings.rb', line 1585 def name @name end |
Instance Method Details
#include?(name) ⇒ Boolean
1592 1593 1594 |
# File 'lib/puppet/settings.rb', line 1592 def include?(name) !@section.setting(name).nil? end |
#inspect ⇒ Object
1603 1604 1605 |
# File 'lib/puppet/settings.rb', line 1603 def inspect %Q{<#{self.class}:#{self.object_id} @name="#{@name}" @section="#{@section}">} end |
#lookup(name) ⇒ Object
1596 1597 1598 1599 1600 1601 |
# File 'lib/puppet/settings.rb', line 1596 def lookup(name) setting = @section.setting(name) if setting setting.value end end |