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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8c4afd16ee13a0f0b5f97872c04e7bfda6bdb222c985206bdb28bb49d6f11f91
4
- data.tar.gz: c881747880e6f021f42fa4fcaeb91762bef8e7c4eb46ba8cef02af2d24be2d12
3
+ metadata.gz: 454edc0d410a785997dffb67186bd1e46b569e291563e22d94ea2d125bbf59c1
4
+ data.tar.gz: 1df9883d0c9673ab083f06a6007346b31a28a83b72ecc6234c4c56cff600ed44
5
5
  SHA512:
6
- metadata.gz: 6dec9f4c42417413fc761e2016022097f62fc7f5275e51314c20266b6de8e7467a302f8c56d7d37b39057821fe6d33653f5114db0e759c2adf3cbf43d2c0cba7
7
- data.tar.gz: 8e82ee8428376243120688186d9cce357550669e5f371fec42f950490d6632955cd0a81dd5feba76644d41359cfcbed13dc6e493a46f15617e84b8b2e460d356
6
+ metadata.gz: 8a7691945cfbe434413ceb1042d1bc774069741512aebf9524ff788f227ac9efe841e2c426b764925372c84bc7204cc40d48abaed87bd81feb077d289bf80df4
7
+ data.tar.gz: 12c03764b1133d72142e9ba5901fdcea2619c551644ea04fcb5fda9419a815f63bec541eb723f7bb089bf858e00d30ec54b26aede83b910d941cbee6c1a20b3f
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- forty_time (0.0.4)
4
+ forty_time (0.0.7)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class FortyTime
4
- VERSION = '0.0.6'
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
@@ -5,6 +5,8 @@ class NullFortyTime < FortyTime
5
5
  super(0)
6
6
  end
7
7
 
8
+ def value; end
9
+
8
10
  def +(other)
9
11
  other
10
12
  end
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.6
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-01 00:00:00.000000000 Z
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.