class OpenEHR::RM::DataStructures::History::Event

Attributes

data[R]
state[RW]
time[R]

Public Class Methods

new(args = { }) click to toggle source
Calls superclass method
# 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

Public Instance Methods

data=(data) click to toggle source
# File lib/open_ehr/rm/data_structures/history.rb, line 57
def data=(data)
  raise ArgumentError, 'data is mandatory' if data.nil?
  @data = data
end
offset() click to toggle source
# File lib/open_ehr/rm/data_structures/history.rb, line 67
def offset
  return @time.diff(@parent.origin)
end
time=(time) click to toggle source
# File lib/open_ehr/rm/data_structures/history.rb, line 62
def time=(time)
  raise ArgumentError, 'time is mandatory' if time.nil?
  @time = time
end