calc_working_hours 0.1.3 → 0.1.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 43b442d4e77191f65533344781ba9659132c8cdc
4
- data.tar.gz: 9b3d97cbb7750cf22d6770a0153edc21d62801a1
3
+ metadata.gz: de4eaa0b8467abb4b621e819e25038b342c33936
4
+ data.tar.gz: dee2875a0559607c565770adf163a786da2ba6dd
5
5
  SHA512:
6
- metadata.gz: c107a7196c471a54f3f420b37a5841bb1dc19693835e0d44a3145d9160855fbbc1226183b4c601f9c09c87678b9cfc315ce3281856407d3807b24af0e16653c7
7
- data.tar.gz: d7c0b1d7100223528da6841dcb157edb9e36b4ded084a13923a0ccd71073d799cff1c10a4fd7dcf0fdbe1061d8f135e6811ef864c1885ddb1eb32d0ba038ff43
6
+ metadata.gz: 7cd7effd40cc868f38230f3ca02fc17fe6fee931fe23147dfb75fa48b90b24ea16411f27d2e0d03cf58043bd239bca3edab93ea296796e50b303014f01001895
7
+ data.tar.gz: 451121820aea6dc580c5d603f94c8e9819c7d48e7097dd1ae14d09ef925cc70cb27dbb3c9be412d7c0970476be2962d4428a9c7e8d0b057f9cc19a90ec405e8a
@@ -49,10 +49,12 @@ module CalcWorkingHours
49
49
  end
50
50
 
51
51
  def set_fixed_working_hours(time)
52
- if @working_hours.minute < WorkingHours.new(time).minute
53
- @overtime = @working_hours.minus_time(@working_hours.time_string)
52
+ time = WorkingHours.new(time)
53
+ working_hours = WorkingHours.new(@working_hours.time_string)
54
+ if working_hours.minute < time.minute
55
+ @overtime = working_hours.minus_time(working_hours.time_string)
54
56
  else
55
- @overtime = @working_hours.minus_time(time)
57
+ @overtime = working_hours.minus_time(time.time_string)
56
58
  end
57
59
  self
58
60
  end
@@ -1,3 +1,3 @@
1
1
  module CalcWorkingHours
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calc_working_hours
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi_U