Class: OpenEHR::RM::DataStructures::History::Event

Inherits:
Locatable
  • Object
show all
Defined in:
lib/open_ehr/rm/data_structures/history.rb

Direct Known Subclasses

IntervalEvent, PointEvent

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dataObject

Returns the value of attribute data.



47
48
49
# File 'lib/open_ehr/rm/data_structures/history.rb', line 47

def data
  @data
end

#stateObject

Returns the value of attribute state.



48
49
50
# File 'lib/open_ehr/rm/data_structures/history.rb', line 48

def state
  @state
end

#timeObject

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

#offsetObject



67
68
69
# File 'lib/open_ehr/rm/data_structures/history.rb', line 67

def offset
  return @time.diff(@parent.origin)
end