Class: Puppet::Util::Profiler::Logging::Sequence Private

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet/util/profiler/logging.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.

Constant Summary collapse

INITIAL =

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

0
SEPARATOR =

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

'.'

Instance Method Summary collapse

Constructor Details

#initializeSequence

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.

Returns a new instance of Sequence.



27
28
29
# File 'lib/puppet/util/profiler/logging.rb', line 27

def initialize
  @elements = [INITIAL]
end

Instance Method Details

#downObject

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.



35
36
37
# File 'lib/puppet/util/profiler/logging.rb', line 35

def down
  @elements << INITIAL
end

#nextObject

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.



31
32
33
# File 'lib/puppet/util/profiler/logging.rb', line 31

def next
  @elements[-1] += 1
end

#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.



43
44
45
# File 'lib/puppet/util/profiler/logging.rb', line 43

def to_s
  @elements.join(SEPARATOR)
end

#upObject

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.



39
40
41
# File 'lib/puppet/util/profiler/logging.rb', line 39

def up
  @elements.pop
end