time_span 0.0.1.beta.01 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,6 +1,7 @@
1
1
  *.gem
2
+ .rbenv-version
3
+ .yardoc/
2
4
  .bundle
3
- Gemfile.lock
4
5
  pkg/*
5
6
  .idea/*
6
7
  .gitignore
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 still in Alpha. The API might well break between now and release, use at your risk.
4
+ This gem is composed of 3 classes:
5
5
 
6
- Better documentation will also follow, as I learn how to write Yard docs.
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
- For now I am focused on spec coverage and core code functionality.
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