Class: Leap::Whip

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

Overview

Facilitates the instrumentation of Leap activity

Defined Under Namespace

Modules: Registered

Instance Method Summary collapse

Instance Method Details

#committee(name, &blk) ⇒ Object

Instrument Leap committee activity

Parameters:

  • name (String, Symbol)

    The committee’s name

  • blk (Proc)

    A proc wrapping the committee convention to instrument



37
38
39
# File 'lib/leap/whip.rb', line 37

def committee(name, &blk)
  Leap.log.committee instrument(&blk), name
end

#decision(name, &blk) ⇒ Object

Instrument a Leap decision

Parameters:

  • name (String, Symbol)

    The decision’s name

  • blk (Proc)

    A proc wrapping the decision to instrument



29
30
31
# File 'lib/leap/whip.rb', line 29

def decision(name, &blk)
  Leap.log.decision instrument(&blk), name
end

#quorum(name, &blk) ⇒ Object

Instrument Leap quorum activity

Parameters:

  • name (String, Symbol)

    The quorum’s name

  • blk (Proc)

    A proc wrapping the quorum activity to instrument



45
46
47
48
49
# File 'lib/leap/whip.rb', line 45

def quorum(name, &blk)
  message, result = instrument(true, &blk) 
  Leap.log.quorum message, name
  result
end