Class: Leap::Report

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(committee, report) ⇒ Report

Returns a new instance of Report.

Raises:

  • (ArgumentError)


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

def initialize(committee, report)
  raise ArgumentError, 'Reports must identify themselves' unless committee.is_a?(::Leap::Committee)
  @committee = committee
  raise ArgumentError, 'Please report with quorum => conclusion' unless report.is_a?(Hash) and report.length == 1
  @quorum, @conclusion = report.first
end

Instance Attribute Details

#committeeObject (readonly)

Returns the value of attribute committee.



3
4
5
# File 'lib/leap/report.rb', line 3

def committee
  @committee
end

#conclusionObject (readonly)

Returns the value of attribute conclusion.



3
4
5
# File 'lib/leap/report.rb', line 3

def conclusion
  @conclusion
end

#quorumObject (readonly)

Returns the value of attribute quorum.



3
4
5
# File 'lib/leap/report.rb', line 3

def quorum
  @quorum
end