Class: Puppet::Settings::IniFile::SectionLine Private

Inherits:
Struct
  • Object
show all
Includes:
LineNumber
Defined in:
lib/puppet/settings/ini_file.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Direct Known Subclasses

DefaultSection

Instance Attribute Summary collapse

Attributes included from LineNumber

#previous

Instance Method Summary collapse

Methods included from LineNumber

#line_number

Instance Attribute Details

#nameObject

Returns the value of attribute name


200
201
202
# File 'lib/puppet/settings/ini_file.rb', line 200

def name
  @name
end

#prefixObject

Returns the value of attribute prefix


200
201
202
# File 'lib/puppet/settings/ini_file.rb', line 200

def prefix
  @prefix
end

#suffixObject

Returns the value of attribute suffix


200
201
202
# File 'lib/puppet/settings/ini_file.rb', line 200

def suffix
  @suffix
end

Instance Method Details

#to_sObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


203
204
205
# File 'lib/puppet/settings/ini_file.rb', line 203

def to_s
  "#{prefix}[#{name}]#{suffix}"
end

#write(fh) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


207
208
209
# File 'lib/puppet/settings/ini_file.rb', line 207

def write(fh)
  fh.puts(to_s)
end