Class: MagicCloud::Debug
- Inherits:
-
Object
- Object
- MagicCloud::Debug
- Extended by:
- Forwardable
- Defined in:
- lib/magic_cloud/debug.rb
Overview
Debugging utilities class for cloud development itself
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#stats ⇒ Object
readonly
Returns the value of attribute stats.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Debug
constructor
A new instance of Debug.
- #reset! ⇒ Object
Constructor Details
#initialize ⇒ Debug
Returns a new instance of Debug.
17 18 19 20 |
# File 'lib/magic_cloud/debug.rb', line 17 def initialize @logger = Logger.new(STDOUT).tap{|l| l.level = Logger::FATAL} @stats = Hash.new{|h, k| h[k] = 0} end |
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
22 23 24 |
# File 'lib/magic_cloud/debug.rb', line 22 def logger @logger end |
#stats ⇒ Object (readonly)
Returns the value of attribute stats.
22 23 24 |
# File 'lib/magic_cloud/debug.rb', line 22 def stats @stats end |
Class Method Details
.instance ⇒ Object
9 10 11 |
# File 'lib/magic_cloud/debug.rb', line 9 def instance @instance ||= new end |
Instance Method Details
#reset! ⇒ Object
24 25 26 |
# File 'lib/magic_cloud/debug.rb', line 24 def reset! @stats = Hash.new{|h, k| h[k] = 0} end |