a_clockwork_ruby 0.0.1 → 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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.0.2
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "a_clockwork_ruby"
8
- s.version = "0.0.1"
8
+ s.version = "0.0.2"
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"]
@@ -57,6 +57,10 @@ class Clock
57
57
  strfclock("%l:%M %p")
58
58
  end
59
59
 
60
+ def inspect
61
+ strfclock("%l:%M %p")
62
+ end
63
+
60
64
  def to_i
61
65
  @sec + (@min * 60) + (@hour * 60**2)
62
66
  end
data/test/clock_test.rb CHANGED
@@ -47,6 +47,13 @@ class ClockTest < Test::Unit::TestCase
47
47
  end
48
48
  end
49
49
 
50
+ context ".inspect" do
51
+ should "return clock as hours:minutes" do
52
+ clock = Clock.new(13, 20)
53
+ assert_equal " 1:20 PM", clock.inspect
54
+ end
55
+ end
56
+
50
57
  context ".==" do
51
58
  should "check equality" do
52
59
  assert Clock.new(3, 24) == Clock.new(3, 24)
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: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Mike Taylor