Class: Gauge::GaugeMessages Private

Inherits:
Object
  • Object
show all
Defined in:
lib/gauge_messages.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.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeGaugeMessages

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



22
23
24
# File 'lib/gauge_messages.rb', line 22

def initialize
  @messages = []
end

Class Method Details

.instanceObject

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.



26
27
28
# File 'lib/gauge_messages.rb', line 26

def self.instance
  @gauge_messages ||= GaugeMessages.new
end

Instance Method Details

#clearObject

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.



44
45
46
# File 'lib/gauge_messages.rb', line 44

def clear
  @messages = []
end

#getObject

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.



40
41
42
# File 'lib/gauge_messages.rb', line 40

def get
  @messages.select { |m| m != nil}
end

#pending_messagesObject

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.



30
31
32
33
34
# File 'lib/gauge_messages.rb', line 30

def pending_messages()
    pending_messages = @messages.select { |m| m != nil}
    @messages = []
    pending_messages
end

#write(message) ⇒ 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.



36
37
38
# File 'lib/gauge_messages.rb', line 36

def write(message)
  @messages.push(message)
end