Class: Gauge::GaugeMessages Private
- Inherits:
-
Object
- Object
- Gauge::GaugeMessages
- 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 ⇒ Object private
Instance Method Summary collapse
- #clear ⇒ Object private
- #get ⇒ Object private
-
#initialize ⇒ GaugeMessages
constructor
private
A new instance of GaugeMessages.
- #pending_messages ⇒ Object private
- #write(message) ⇒ Object private
Constructor Details
#initialize ⇒ GaugeMessages
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
.instance ⇒ 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.
26 27 28 |
# File 'lib/gauge_messages.rb', line 26 def self.instance @gauge_messages ||= GaugeMessages.new end |
Instance Method Details
#clear ⇒ 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.
44 45 46 |
# File 'lib/gauge_messages.rb', line 44 def clear @messages = [] end |
#get ⇒ 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.
40 41 42 |
# File 'lib/gauge_messages.rb', line 40 def get @messages.select { |m| m != nil} end |
#pending_messages ⇒ 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.
30 31 32 33 34 |
# File 'lib/gauge_messages.rb', line 30 def () = @messages.select { |m| m != nil} @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() @messages.push() end |