tempus 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/tempus.rb +11 -1
- data/lib/tempus/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2001b2e89f2be1909675a61ef595fcb3fa103b575c90cdcf1186961bac14077e
|
4
|
+
data.tar.gz: 3952d416260d86f7ef8c2fadc77077e6c27f937462625bcca5b177e09dd01499
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fed0de79e4abb9a77b68606052c5011a16dd5dadf7abf4782b61ac225dbdbddca39b8d39f22d139c515c48013a617b160012e89eaba9f3f8a95e75848e89cde3
|
7
|
+
data.tar.gz: 5d4f7b6952b668b061ffb83451f721d97809810089b0b4c0748060a2cdde89c7729e0badc2d31ab0eb7ed6b4088cbcda0a9a80dde56baec837bffb17289d8627
|
data/Gemfile.lock
CHANGED
data/lib/tempus.rb
CHANGED
@@ -17,7 +17,7 @@ class Tempus
|
|
17
17
|
MINUTES_REGEX = /(\%m|\%mm|\%M|\%MM)/.freeze
|
18
18
|
SECONDS_REGEX = /(\%s|\%ss|\%S|\%SS)/.freeze
|
19
19
|
|
20
|
-
|
20
|
+
attr_reader :data
|
21
21
|
|
22
22
|
delegate :to_i, :to_f, :negative?, :positive?, to: :data
|
23
23
|
|
@@ -121,6 +121,16 @@ class Tempus
|
|
121
121
|
Tempus.new(data - transform(other))
|
122
122
|
end
|
123
123
|
|
124
|
+
# Multiplication values of instance
|
125
|
+
def *(other)
|
126
|
+
Tempus.new(data * transform(other))
|
127
|
+
end
|
128
|
+
|
129
|
+
# Division values of instance
|
130
|
+
def /(other)
|
131
|
+
Tempus.new(data / transform(other))
|
132
|
+
end
|
133
|
+
|
124
134
|
def human
|
125
135
|
[
|
126
136
|
('menos' if negative?),
|
data/lib/tempus/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tempus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danilo Jeremias da Silva
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
141
141
|
- !ruby/object:Gem::Version
|
142
142
|
version: '0'
|
143
143
|
requirements: []
|
144
|
-
rubygems_version: 3.0.
|
144
|
+
rubygems_version: 3.0.6
|
145
145
|
signing_key:
|
146
146
|
specification_version: 4
|
147
147
|
summary: Gem to efficiently manipulate the time.
|