Class: Bipm::Data::Outcomes::Consideration
- Inherits:
-
Object
- Object
- Bipm::Data::Outcomes::Consideration
- Defined in:
- lib/bipm/data/outcomes/consideration.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
- #date_effective ⇒ Object
- #document ⇒ Object
-
#initialize(resolution, index) ⇒ Consideration
constructor
A new instance of Consideration.
- #message ⇒ Object
- #type ⇒ Object
Constructor Details
#initialize(resolution, index) ⇒ Consideration
Returns a new instance of Consideration.
7 8 9 10 11 12 |
# File 'lib/bipm/data/outcomes/consideration.rb', line 7 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.
18 19 20 |
# File 'lib/bipm/data/outcomes/consideration.rb', line 18 def index @index end |
#resolution ⇒ Object (readonly)
Returns the value of attribute resolution.
18 19 20 |
# File 'lib/bipm/data/outcomes/consideration.rb', line 18 def resolution @resolution end |
Instance Method Details
#date_effective ⇒ Object
25 26 27 |
# File 'lib/bipm/data/outcomes/consideration.rb', line 25 def date_effective Date.parse(document["date_effective"]) end |
#document ⇒ Object
14 15 16 |
# File 'lib/bipm/data/outcomes/consideration.rb', line 14 def document @resolution.document.dig("considerations", index) end |
#message ⇒ Object
29 30 31 |
# File 'lib/bipm/data/outcomes/consideration.rb', line 29 def document["message"] end |
#type ⇒ Object
21 22 23 |
# File 'lib/bipm/data/outcomes/consideration.rb', line 21 def type document["type"].to_sym end |