Class: OpenEHR::RM::DataStructures::History::Event
- Inherits:
-
Locatable
- Object
- Locatable
- OpenEHR::RM::DataStructures::History::Event
- Defined in:
- lib/open_ehr/rm/data_structures/history.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#state ⇒ Object
Returns the value of attribute state.
-
#time ⇒ Object
Returns the value of attribute time.
Instance Method Summary collapse
-
#initialize(args = { }) ⇒ Event
constructor
A new instance of Event.
- #offset ⇒ Object
Constructor Details
#initialize(args = { }) ⇒ Event
Returns a new instance of Event.
50 51 52 53 54 55 |
# File 'lib/open_ehr/rm/data_structures/history.rb', line 50 def initialize(args = { }) super(args) self.data = args[:data] self.time = args[:time] self.state = args[:state] end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
47 48 49 |
# File 'lib/open_ehr/rm/data_structures/history.rb', line 47 def data @data end |
#state ⇒ Object
Returns the value of attribute state.
48 49 50 |
# File 'lib/open_ehr/rm/data_structures/history.rb', line 48 def state @state end |
#time ⇒ Object
Returns the value of attribute time.
47 48 49 |
# File 'lib/open_ehr/rm/data_structures/history.rb', line 47 def time @time end |
Instance Method Details
#offset ⇒ Object
67 68 69 |
# File 'lib/open_ehr/rm/data_structures/history.rb', line 67 def offset return @time.diff(@parent.origin) end |