days_and_times 1.0.1 → 1.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.tar.gz.sig +0 -0
- data/README.txt +2 -2
- data/lib/days_and_times.rb +1 -1
- data/lib/days_and_times/duration.rb +6 -0
- metadata +20 -9
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/README.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
* Homepage: http://dcparker.github.com/days_and_times
|
4
4
|
* Code: http://github.com/dcparker/days_and_times
|
5
|
-
* Download: http://gemcutter.
|
5
|
+
* Download: http://gemcutter.org/gems/days_and_times
|
6
6
|
|
7
7
|
== DESCRIPTION:
|
8
8
|
|
@@ -44,7 +44,7 @@ Natural language method chaining for Time, Durations and the like.
|
|
44
44
|
|
45
45
|
== INSTALL:
|
46
46
|
|
47
|
-
gem install days_and_times -s http://gemcutter.
|
47
|
+
gem install days_and_times -s http://gemcutter.org
|
48
48
|
|
49
49
|
== LICENSE:
|
50
50
|
|
data/lib/days_and_times.rb
CHANGED
@@ -54,6 +54,12 @@ class Duration
|
|
54
54
|
def abs_length
|
55
55
|
@length
|
56
56
|
end
|
57
|
+
def to_a
|
58
|
+
hrs = hours.to_i
|
59
|
+
mins = (self - hrs.hours).minutes.to_i
|
60
|
+
secs = (self - hrs.hours - mins.minutes).seconds.to_i
|
61
|
+
[hrs, mins, secs]
|
62
|
+
end
|
57
63
|
def to_i
|
58
64
|
self.abs_length.to_i
|
59
65
|
end
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: days_and_times
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 1
|
7
|
+
- 0
|
8
|
+
- 2
|
9
|
+
version: 1.0.2
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Daniel Parker
|
@@ -30,19 +35,23 @@ cert_chain:
|
|
30
35
|
teST6sOe8lUhZQ==
|
31
36
|
-----END CERTIFICATE-----
|
32
37
|
|
33
|
-
date:
|
38
|
+
date: 2010-03-11 00:00:00 -05:00
|
34
39
|
default_executable:
|
35
40
|
dependencies:
|
36
41
|
- !ruby/object:Gem::Dependency
|
37
42
|
name: hoe
|
38
|
-
|
39
|
-
|
40
|
-
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
prerelease: false
|
44
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
41
45
|
requirements:
|
42
46
|
- - ">="
|
43
47
|
- !ruby/object:Gem::Version
|
48
|
+
segments:
|
49
|
+
- 2
|
50
|
+
- 3
|
51
|
+
- 3
|
44
52
|
version: 2.3.3
|
45
|
-
|
53
|
+
type: :development
|
54
|
+
version_requirements: *id001
|
46
55
|
description: Natural language method chaining for Time, Durations and the like.
|
47
56
|
email:
|
48
57
|
- gems@behindlogic.com
|
@@ -83,18 +92,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
83
92
|
requirements:
|
84
93
|
- - ">="
|
85
94
|
- !ruby/object:Gem::Version
|
95
|
+
segments:
|
96
|
+
- 0
|
86
97
|
version: "0"
|
87
|
-
version:
|
88
98
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
89
99
|
requirements:
|
90
100
|
- - ">="
|
91
101
|
- !ruby/object:Gem::Version
|
102
|
+
segments:
|
103
|
+
- 0
|
92
104
|
version: "0"
|
93
|
-
version:
|
94
105
|
requirements: []
|
95
106
|
|
96
107
|
rubyforge_project: days_and_times
|
97
|
-
rubygems_version: 1.3.
|
108
|
+
rubygems_version: 1.3.6
|
98
109
|
signing_key:
|
99
110
|
specification_version: 3
|
100
111
|
summary: Natural language method chaining for Time, Durations and the like.
|
metadata.gz.sig
CHANGED
Binary file
|