time_span 0.0.1.beta.01 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +2 -1
- data/Gemfile.lock +24 -0
- data/README.md +12 -3
- data/doc/TimeSpan/RelativeTime.html +646 -329
- data/doc/TimeSpan/TimeLine.html +1705 -542
- data/doc/TimeSpan/TimeSpan.html +2764 -889
- data/doc/TimeSpan.html +118 -142
- data/doc/_index.html +135 -0
- data/doc/class_list.html +47 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +55 -0
- data/doc/css/style.css +322 -0
- data/doc/file.README.html +85 -0
- data/doc/file_list.html +49 -0
- data/doc/frames.html +13 -0
- data/doc/index.html +69 -124
- data/doc/js/app.js +205 -0
- data/doc/js/full_list.js +173 -0
- data/doc/js/jquery.js +13 -29
- data/doc/method_list.html +462 -0
- data/doc/top-level-namespace.html +105 -0
- data/lib/time_span/version.rb +1 -1
- data/lib/time_span.rb +196 -72
- data/spec/time_span/time_span_spec.rb +12 -3
- metadata +21 -9
data/.gitignore
CHANGED
data/Gemfile.lock
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
time_span (0.0.1.beta.01)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: http://rubygems.org/
|
8
|
+
specs:
|
9
|
+
diff-lcs (1.1.3)
|
10
|
+
rspec (2.8.0)
|
11
|
+
rspec-core (~> 2.8.0)
|
12
|
+
rspec-expectations (~> 2.8.0)
|
13
|
+
rspec-mocks (~> 2.8.0)
|
14
|
+
rspec-core (2.8.0)
|
15
|
+
rspec-expectations (2.8.0)
|
16
|
+
diff-lcs (~> 1.1.2)
|
17
|
+
rspec-mocks (2.8.0)
|
18
|
+
|
19
|
+
PLATFORMS
|
20
|
+
ruby
|
21
|
+
|
22
|
+
DEPENDENCIES
|
23
|
+
rspec
|
24
|
+
time_span!
|
data/README.md
CHANGED
@@ -1,11 +1,20 @@
|
|
1
1
|
Time Span
|
2
2
|
==========
|
3
3
|
|
4
|
-
This gem is
|
4
|
+
This gem is composed of 3 classes:
|
5
5
|
|
6
|
-
|
6
|
+
* RelativeTime, which are time objects, with a link to another other Ruby Object. They are not in any way absolute,1and relate only to other RelativeTime objects on the same TimeLine. Many RelativeTimes can happen at the same time. It is not possible to get a difference, as it would be meaningless. Other comparators are implemented.
|
7
|
+
* TimeLine, is the context for RelativeTimes and TimeSpans for comparison.
|
8
|
+
* TimeSpan, which is composed of two RelativeTimes (a begining and ending time) on a TimeLine.
|
9
|
+
|
10
|
+
A *RelativeTime* has an associate Ruby Object (of any class), which should '#respond_to?(:to_s)'
|
7
11
|
|
8
12
|
A RelativeTime can occur with more than one TimeSpan, so must also keep track of the TimeLine to TimeSpan relationship.
|
9
13
|
|
10
|
-
|
14
|
+
Comparisons of any kind only make sense within a given TimeLine.
|
15
|
+
|
16
|
+
*TimeSpan*s are automatically attached to a TimeLine, but *RelativeTime*s are not.
|
17
|
+
|
18
|
+
*TimeLine*s are the only structure with even a moderate data complexity. There is is a hash which keeps the relative position for each RelativeTime. This structure allows more than one RelativeTime to be equal compared to other RelativeTimes.
|
19
|
+
|
11
20
|
|