Module: TemporalObject
- Defined in:
- lib/temporal_object.rb,
lib/temporal_object/version.rb
Overview
Constant Summary
- VERSION =
"0.1.5"
Instance Attribute Summary (collapse)
-
- (Object) temporal_statuses
- Array
-
of TimeSpan::TimeLine statuses for temporal attributes.
Instance Method Summary (collapse)
-
- (Array) add_timeline(timeline)
add a timeline to the TemporalObject.
-
- (TemporalObject) initialize
A new instance of TemporalObject.
-
- (TimeSpan::TimeLine?) remove_timeline(timeline)
delete the cited timeline.
-
- (Array) remove_timelines
remove all TimeLine s from the TemporalObject.
Instance Attribute Details
- (Object) temporal_statuses
- Array
-
of TimeSpan::TimeLine statuses for temporal attributes
9 10 11 |
# File 'lib/temporal_object.rb', line 9 def temporal_statuses @temporal_statuses end |
Instance Method Details
- (Array) add_timeline(timeline)
add a timeline to the TemporalObject
19 20 21 22 |
# File 'lib/temporal_object.rb', line 19 def add_timeline(timeline) raise ArgumentError, "Can only add a TimeSpan::TimeLine to a TemporalObject's statuses" unless timeline.kind_of? TimeSpan::TimeLine @temporal_statuses << timeline end |
- (TemporalObject) initialize
A new instance of TemporalObject
11 12 13 14 |
# File 'lib/temporal_object.rb', line 11 def initialize super @temporal_statuses = [] # Array of TimeSpan::TimeLine end |
- (TimeSpan::TimeLine?) remove_timeline(timeline)
delete the cited timeline
34 35 36 37 |
# File 'lib/temporal_object.rb', line 34 def remove_timeline(timeline) raise ArgumentError, "Can only remove a TimeLine with this call." unless timeline.kind_of? TimeSpan::TimeLine @temporal_statuses.delete(timeline) end |
- (Array) remove_timelines
remove all TimeLine s from the TemporalObject
26 27 28 |
# File 'lib/temporal_object.rb', line 26 def remove_timelines @temporal_statuses = [] end |