Class: Leap::Report
- Inherits:
-
Object
- Object
- Leap::Report
- Defined in:
- lib/leap/report.rb
Instance Attribute Summary collapse
-
#committee ⇒ Object
readonly
Returns the value of attribute committee.
-
#conclusion ⇒ Object
readonly
Returns the value of attribute conclusion.
-
#quorum ⇒ Object
readonly
Returns the value of attribute quorum.
Instance Method Summary collapse
-
#initialize(committee, report) ⇒ Report
constructor
A new instance of Report.
Constructor Details
#initialize(committee, report) ⇒ Report
Returns a new instance of Report.
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
#committee ⇒ Object (readonly)
Returns the value of attribute committee.
3 4 5 |
# File 'lib/leap/report.rb', line 3 def committee @committee end |
#conclusion ⇒ Object (readonly)
Returns the value of attribute conclusion.
3 4 5 |
# File 'lib/leap/report.rb', line 3 def conclusion @conclusion end |
#quorum ⇒ Object (readonly)
Returns the value of attribute quorum.
3 4 5 |
# File 'lib/leap/report.rb', line 3 def quorum @quorum end |