runby_pace 0.6.122 → 0.6.123
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/runby_pace/runby_time.rb +17 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14bec52c2faa7e9936526d994d3d4a10c6e74509
|
4
|
+
data.tar.gz: 8068b32a9353c112ab6d29a87dd170bdf7d1513f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 120a13af53ead77a23645364eaf91de9d9a47cdf52286dd26ac830b81d2676c6bca0978c68df415161cae288d8dd85f5512de7385b7d3512474ee5bf766cedad
|
7
|
+
data.tar.gz: fb4abaf19e39ac604606f0964a0fc13e487e78f89a4d68c7aee8243ebe30d41cf4c10a1f8a5104c397ed2447cf2a7ac2ff813bbb20627267dfd9387b400019e1
|
@@ -119,6 +119,23 @@ module Runby
|
|
119
119
|
RunbyTime.from_seconds(total_seconds + other.total_seconds) if other.is_a?(RunbyTime)
|
120
120
|
end
|
121
121
|
|
122
|
+
# @param [Numeric] other
|
123
|
+
# @return [RunbyTime]
|
124
|
+
def *(other)
|
125
|
+
RunbyTime.from_minutes(total_minutes * other) if other.is_a?(Numeric)
|
126
|
+
end
|
127
|
+
|
128
|
+
# @param [RunbyTime, Numeric] other
|
129
|
+
# @return [Numeric, RunbyTime]
|
130
|
+
def /(other)
|
131
|
+
case other
|
132
|
+
when RunbyTime
|
133
|
+
total_seconds / other.total_seconds
|
134
|
+
when Numeric
|
135
|
+
RunbyTime.from_seconds(total_seconds / other)
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
122
139
|
def <=>(other)
|
123
140
|
if other.is_a? RunbyTime
|
124
141
|
total_seconds <=> other.total_seconds
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: runby_pace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.123
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ty Walls
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -101,7 +101,7 @@ homepage: https://github.com/tygerbytes/runby-pace
|
|
101
101
|
licenses:
|
102
102
|
- MIT
|
103
103
|
metadata:
|
104
|
-
commit-hash:
|
104
|
+
commit-hash: bafaefeb3f83f25cacbe2cd6af83382c348f1ef7
|
105
105
|
post_install_message:
|
106
106
|
rdoc_options: []
|
107
107
|
require_paths:
|