Class: Leap::Register

Inherits:
Object
  • Object
show all
Defined in:
lib/leap/register.rb

Overview

Facilitates the logging of Leap activity

Instance Method Summary collapse

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

Parameters:

  • message (String)

    The message to be logged

  • name (String)

    The name of the committee



43
44
45
# File 'lib/leap/register.rb', line 43

def committee(message, name)
  record name, message, 1
end

#decision(message, name) ⇒ Object

Log a Leap decision

Parameters:

  • message (String)

    The message to be logged

  • name (String)

    The name of the decision



35
36
37
# File 'lib/leap/register.rb', line 35

def decision(message, name)
  record name, message, 0
end

#quorum(message, name) ⇒ Object

Log Leap quorum activity

Parameters:

  • message (String)

    The message to be logged

  • name (String)

    The name of the quorum



51
52
53
# File 'lib/leap/register.rb', line 51

def quorum(message, name)
  record name, message, 2
end