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.
1404 1405 1406 1407 |
# File 'lib/puppet/settings.rb', line 1404 def initialize(name, section) @name = name @section = section end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
1402 1403 1404 |
# File 'lib/puppet/settings.rb', line 1402 def name @name end |
Instance Method Details
#include?(name) ⇒ Boolean
1409 1410 1411 |
# File 'lib/puppet/settings.rb', line 1409 def include?(name) !@section.setting(name).nil? end |
#inspect ⇒ Object
1420 1421 1422 |
# File 'lib/puppet/settings.rb', line 1420 def inspect %Q{<#{self.class}:#{self.object_id} @name="#{@name}" @section="#{@section}">} end |
#lookup(name) ⇒ Object
1413 1414 1415 1416 1417 1418 |
# File 'lib/puppet/settings.rb', line 1413 def lookup(name) setting = @section.setting(name) if setting setting.value end end |