Module: Puppet::Settings::IniFile::LineNumber Private

Included in:
Line, SectionLine, SettingLine
Defined in:
lib/puppet/settings/ini_file.rb

Overview

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

API:

  • private

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#previousObject

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.

API:

  • private



160
161
162
# File 'lib/puppet/settings/ini_file.rb', line 160

def previous
  @previous
end

Instance Method Details

#line_numberObject

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.

API:

  • private



162
163
164
165
166
167
168
169
170
# File 'lib/puppet/settings/ini_file.rb', line 162

def line_number
  line = 0
  previous_line = previous
  while previous_line
    line += 1
    previous_line = previous_line.previous
  end
  line
end