runby_pace 0.6.122 → 0.6.123

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/runby_pace/runby_time.rb +17 -0
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 77901c6c966192b9bb8b394afedee348ec886fb0
4
- data.tar.gz: 822b5b11c45e96dbd89b15d2af230453bdef2e4e
3
+ metadata.gz: 14bec52c2faa7e9936526d994d3d4a10c6e74509
4
+ data.tar.gz: 8068b32a9353c112ab6d29a87dd170bdf7d1513f
5
5
  SHA512:
6
- metadata.gz: 0f22d8c1fec24e77bb5ba33361b22c7903988225e8015f90410e3b76e0909404fc43827bd816f68d9f16f0c24b4c2e3d6bbc93121c4eea56afbe96536b36e935
7
- data.tar.gz: ee4f606570dee5c43c6f21edecd1de95b524ebe54711a33c1022abbaac70327fccf210505dcf25105d7dfca151e48d29f27b524906827828c9bffc550c3d5223
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.122
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-08 00:00:00.000000000 Z
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: 6e01e0d8cd177b8143f6042eedabdd453f41b3d6
104
+ commit-hash: bafaefeb3f83f25cacbe2cd6af83382c348f1ef7
105
105
  post_install_message:
106
106
  rdoc_options: []
107
107
  require_paths: