Class: Leap::Register
- Inherits:
-
Object
- Object
- Leap::Register
- Defined in:
- lib/leap/register.rb
Overview
Facilitates the logging of Leap activity
Instance Method Summary collapse
-
#committee(message, name) ⇒ Object
Log Leap committee action.
-
#decision(message, name) ⇒ Object
Log a Leap decision.
-
#initialize(logger = nil) ⇒ Register
constructor
Creates a
Leap::Register
wrapper around a given (optional) logger. -
#quorum(message, name) ⇒ Object
Log Leap quorum activity.
Constructor Details
#initialize(logger = nil) ⇒ Register
Creates a Leap::Register
wrapper around a given (optional) logger. If no logger is provided, Leap assumes Logger.new($stdout)
.
27 28 29 |
# File 'lib/leap/register.rb', line 27 def initialize(logger = nil) @logger = logger || ::Logger.new($stdout) end |
Instance Method Details
#committee(message, name) ⇒ Object
Log Leap committee action
43 44 45 |
# File 'lib/leap/register.rb', line 43 def committee(, name) record name, , 1 end |
#decision(message, name) ⇒ Object
Log a Leap decision
35 36 37 |
# File 'lib/leap/register.rb', line 35 def decision(, name) record name, , 0 end |
#quorum(message, name) ⇒ Object
Log Leap quorum activity
51 52 53 |
# File 'lib/leap/register.rb', line 51 def quorum(, name) record name, , 2 end |