Class: OpenEHR::RM::Common::Generic::RevisionHistory
- Inherits:
-
Object
- Object
- OpenEHR::RM::Common::Generic::RevisionHistory
- Defined in:
- lib/open_ehr/rm/common/generic.rb
Instance Attribute Summary collapse
-
#items ⇒ Object
Returns the value of attribute items.
Instance Method Summary collapse
-
#initialize(args = { }) ⇒ RevisionHistory
constructor
A new instance of RevisionHistory.
- #most_recent_version ⇒ Object
- #most_recent_version_time_committed ⇒ Object
Constructor Details
#initialize(args = { }) ⇒ RevisionHistory
Returns a new instance of RevisionHistory.
50 51 52 |
# File 'lib/open_ehr/rm/common/generic.rb', line 50 def initialize(args = { }) self.items = args[:items] end |
Instance Attribute Details
#items ⇒ Object
Returns the value of attribute items.
48 49 50 |
# File 'lib/open_ehr/rm/common/generic.rb', line 48 def items @items end |
Instance Method Details
#most_recent_version ⇒ Object
61 62 63 |
# File 'lib/open_ehr/rm/common/generic.rb', line 61 def most_recent_version return @items.last.version_id.value end |
#most_recent_version_time_committed ⇒ Object
65 66 67 |
# File 'lib/open_ehr/rm/common/generic.rb', line 65 def most_recent_version_time_committed return @items.last.audits.first.time_committed.value end |