Class: Bipm::Data::Outcomes::Approval
- Inherits:
-
Object
- Object
- Bipm::Data::Outcomes::Approval
- Defined in:
- lib/bipm/data/outcomes/approval.rb
Instance Attribute Summary collapse
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#resolution ⇒ Object
readonly
Returns the value of attribute resolution.
Instance Method Summary collapse
- #document ⇒ Object
-
#initialize(resolution, index) ⇒ Approval
constructor
A new instance of Approval.
- #message ⇒ Object
Constructor Details
#initialize(resolution, index) ⇒ Approval
Returns a new instance of Approval.
5 6 7 8 9 10 |
# File 'lib/bipm/data/outcomes/approval.rb', line 5 def initialize(resolution, index) @resolution = resolution @index = index raise IndexError unless document end |
Instance Attribute Details
#index ⇒ Object (readonly)
Returns the value of attribute index.
16 17 18 |
# File 'lib/bipm/data/outcomes/approval.rb', line 16 def index @index end |
#resolution ⇒ Object (readonly)
Returns the value of attribute resolution.
16 17 18 |
# File 'lib/bipm/data/outcomes/approval.rb', line 16 def resolution @resolution end |
Instance Method Details
#document ⇒ Object
12 13 14 |
# File 'lib/bipm/data/outcomes/approval.rb', line 12 def document @resolution.document.dig("approvals", index) end |
#message ⇒ Object
19 20 21 |
# File 'lib/bipm/data/outcomes/approval.rb', line 19 def document["message"] end |