forty_time 0.0.6 → 0.0.7
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/forty_time.rb +4 -2
- data/lib/null_forty_time.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 454edc0d410a785997dffb67186bd1e46b569e291563e22d94ea2d125bbf59c1
|
4
|
+
data.tar.gz: 1df9883d0c9673ab083f06a6007346b31a28a83b72ecc6234c4c56cff600ed44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a7691945cfbe434413ceb1042d1bc774069741512aebf9524ff788f227ac9efe841e2c426b764925372c84bc7204cc40d48abaed87bd81feb077d289bf80df4
|
7
|
+
data.tar.gz: 12c03764b1133d72142e9ba5901fdcea2619c551644ea04fcb5fda9419a815f63bec541eb723f7bb089bf858e00d30ec54b26aede83b910d941cbee6c1a20b3f
|
data/Gemfile.lock
CHANGED
data/lib/forty_time.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
class FortyTime
|
4
|
-
VERSION = '0.0.
|
4
|
+
VERSION = '0.0.7'
|
5
5
|
|
6
6
|
class ParseError < StandardError; end
|
7
7
|
|
8
8
|
def self.parse(input)
|
9
|
-
return NullFortyTime.new if input.nil?
|
9
|
+
return NullFortyTime.new if input.nil? || input == ''
|
10
10
|
return new(input) if input.is_a? Integer
|
11
11
|
|
12
12
|
can_parse_string = input.is_a?(String) && input.match?(/:/)
|
@@ -25,6 +25,8 @@ class FortyTime
|
|
25
25
|
|
26
26
|
attr_accessor :minutes
|
27
27
|
|
28
|
+
alias value minutes
|
29
|
+
|
28
30
|
def initialize(minutes)
|
29
31
|
@minutes = minutes
|
30
32
|
end
|
data/lib/null_forty_time.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forty_time
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Allured
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This gem helps one go between intergers and strings to represent time
|
14
14
|
amounts.
|