Class: OpenEHR::RM::Common::Resource::AuthoredResource
- Inherits:
-
Object
- Object
- OpenEHR::RM::Common::Resource::AuthoredResource
- Defined in:
- lib/open_ehr/rm/common/resource.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#original_language ⇒ Object
Returns the value of attribute original_language.
-
#revision_history ⇒ Object
Returns the value of attribute revision_history.
-
#translations ⇒ Object
Returns the value of attribute translations.
Instance Method Summary collapse
- #current_revision ⇒ Object
-
#initialize(args = { }) ⇒ AuthoredResource
constructor
A new instance of AuthoredResource.
- #is_controlled? ⇒ Boolean
- #languages_available ⇒ Object
Constructor Details
#initialize(args = { }) ⇒ AuthoredResource
Returns a new instance of AuthoredResource.
10 11 12 13 14 15 |
# File 'lib/open_ehr/rm/common/resource.rb', line 10 def initialize(args = { }) self.original_language = args[:original_language] self.translations = args[:translations] self.revision_history = args[:revision_history] self.description = args[:description] end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
8 9 10 |
# File 'lib/open_ehr/rm/common/resource.rb', line 8 def description @description end |
#original_language ⇒ Object
Returns the value of attribute original_language.
7 8 9 |
# File 'lib/open_ehr/rm/common/resource.rb', line 7 def original_language @original_language end |
#revision_history ⇒ Object
Returns the value of attribute revision_history.
8 9 10 |
# File 'lib/open_ehr/rm/common/resource.rb', line 8 def revision_history @revision_history end |
#translations ⇒ Object
Returns the value of attribute translations.
7 8 9 |
# File 'lib/open_ehr/rm/common/resource.rb', line 7 def translations @translations end |
Instance Method Details
#current_revision ⇒ Object
31 32 33 |
# File 'lib/open_ehr/rm/common/resource.rb', line 31 def current_revision @revision_history.most_recent_version end |
#is_controlled? ⇒ Boolean
39 40 41 |
# File 'lib/open_ehr/rm/common/resource.rb', line 39 def is_controlled? return !@revision_history.nil? end |
#languages_available ⇒ Object
35 36 37 |
# File 'lib/open_ehr/rm/common/resource.rb', line 35 def languages_available return Set.new(@translations.keys) << original_language.code_string end |