Class: Leap::Report

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

Overview

Encapsulates a committee’s report; that is, the conclusion of its selected quorum, along with administrative details.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(committee, quorum, conclusion) ⇒ Report

Create a new report.

This is generally called in the midst of Leap::Committee#report

Parameters:

  • The (Leap::Committee)

    committee that produced the report.

  • The (Leap::Quorum)

    responsible quorum.

  • The (any)

    conclusion.

  • report (Hash)

    A single-pair hash containing the responsible quorum and its conclusion.

Raises:

  • (ArgumentError)

    Raised for anonymous reports.



22
23
24
25
26
27
# File 'lib/leap/report.rb', line 22

def initialize(committee, quorum, conclusion)
  raise ArgumentError, 'Reports must identify themselves' unless committee.is_a?(::Leap::Committee)
  @committee = committee
  @quorum = quorum
  @conclusion = conclusion
end

Instance Attribute Details

#committeeObject (readonly)

The committee that produced the report



6
7
8
# File 'lib/leap/report.rb', line 6

def committee
  @committee
end

#conclusionObject (readonly)

The committee’s conclusion



9
10
11
# File 'lib/leap/report.rb', line 9

def conclusion
  @conclusion
end

#quorumObject (readonly)

The quorum whose methodology provided the conclusion.



12
13
14
# File 'lib/leap/report.rb', line 12

def quorum
  @quorum
end