a_clockwork_ruby 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +39 -0
- data/Rakefile +2 -2
- data/VERSION +1 -1
- data/a_clockwork_ruby.gemspec +2 -2
- metadata +4 -4
data/README.md
CHANGED
@@ -1,5 +1,44 @@
|
|
1
1
|
# A Clockwork Ruby - A clock class for use with time of day.
|
2
2
|
|
3
|
+
```ruby
|
4
|
+
|
5
|
+
clock = Clock.now
|
6
|
+
=> 5:28 PM
|
7
|
+
|
8
|
+
other_clock = Clock.new(13,3)
|
9
|
+
=> 1:03 PM
|
10
|
+
|
11
|
+
clock.hour
|
12
|
+
=> 17
|
13
|
+
clock.min
|
14
|
+
=> 30
|
15
|
+
clock.sec
|
16
|
+
=> 21
|
17
|
+
clock.usec
|
18
|
+
=> 266631
|
19
|
+
|
20
|
+
clock.hour = 23
|
21
|
+
=> 23
|
22
|
+
|
23
|
+
Clock.from_i(12345)
|
24
|
+
=> 3:25 AM
|
25
|
+
|
26
|
+
Clock.now.to_i
|
27
|
+
=> 63393
|
28
|
+
|
29
|
+
clock == other_clock
|
30
|
+
=> false
|
31
|
+
|
32
|
+
clock > other_clock
|
33
|
+
=> true
|
34
|
+
|
35
|
+
# Takes same arguments as strftime
|
36
|
+
clock.strfclock('%H:%M:%S')
|
37
|
+
=> "17:30:21"
|
38
|
+
|
39
|
+
```
|
40
|
+
|
41
|
+
|
3
42
|
# Credits
|
4
43
|
|
5
44
|
Shared Shoulda is maintained by [Mike Taylor](http://github.com/sealabcore) and is funded by [BookRenter.com](http://www.bookrenter.com "BookRenter.com"). Help provided by [Michael Pearce](http://github.com/michaelgpearce), and [Miguel Huibonhoa](http://github.com/phuibonhoa).
|
data/Rakefile
CHANGED
@@ -27,14 +27,14 @@ Jeweler::RubygemsDotOrgTasks.new
|
|
27
27
|
require 'rake/testtask'
|
28
28
|
Rake::TestTask.new(:test) do |test|
|
29
29
|
test.libs << 'lib' << 'test'
|
30
|
-
test.pattern = 'test
|
30
|
+
test.pattern = 'test/**/*_test.rb'
|
31
31
|
test.verbose = true
|
32
32
|
end
|
33
33
|
|
34
34
|
require 'rcov/rcovtask'
|
35
35
|
Rcov::RcovTask.new do |test|
|
36
36
|
test.libs << 'test'
|
37
|
-
test.pattern = 'test
|
37
|
+
test.pattern = 'test/**/*_test.rb'
|
38
38
|
test.verbose = true
|
39
39
|
end
|
40
40
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
data/a_clockwork_ruby.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "a_clockwork_ruby"
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Mike Taylor", "Michael Pearce"]
|
12
|
-
s.date = "2012-02-
|
12
|
+
s.date = "2012-02-07"
|
13
13
|
s.description = "A clock class for use with time of day"
|
14
14
|
s.email = "michael.taylor@bookrenter.com"
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: a_clockwork_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Mike Taylor
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2012-02-
|
19
|
+
date: 2012-02-07 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|