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.
1432 1433 1434 1435 |
# File 'lib/puppet/settings.rb', line 1432 def initialize(name, section) @name = name @section = section end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
1430 1431 1432 |
# File 'lib/puppet/settings.rb', line 1430 def name @name end |
Instance Method Details
#include?(name) ⇒ Boolean
1437 1438 1439 |
# File 'lib/puppet/settings.rb', line 1437 def include?(name) !@section.setting(name).nil? end |
#inspect ⇒ Object
1448 1449 1450 |
# File 'lib/puppet/settings.rb', line 1448 def inspect %Q{<#{self.class}:#{self.object_id} @name="#{@name}" @section="#{@section}">} end |
#lookup(name) ⇒ Object
1441 1442 1443 1444 1445 1446 |
# File 'lib/puppet/settings.rb', line 1441 def lookup(name) setting = @section.setting(name) if setting setting.value end end |