birthday_calculator 0.0.1 → 0.0.2

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/birthday_calculator.rb +3 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 48e69fe5b091bd622a4e1e1c7957a8881f2be0f5de3edf80e3e29c9cccea8228
4
- data.tar.gz: aa7f9f3e8a74b488109ae84b757121c23f4a7f3b18f4d4e0b1ee7f8634940470
3
+ metadata.gz: 773901be5cf1fca6cc4c74d2a9f7a3cde857c7146b3771bbfad3471f41a34114
4
+ data.tar.gz: cce4229b3e29e6e8ab0cf8c04c7c652bd42e59ef76a17d91100dbb541373e46a
5
5
  SHA512:
6
- metadata.gz: b88d4968a35760346dc2f50ab9d83ab09f29fa42182f68976587e4a5ee95731a3532428e95506a7372dbd555927a2feacc6cfe570e54f838d5da27e6b245c10e
7
- data.tar.gz: eebdbe9d4d7e61e087ec61440ba89036a0e7f495845b4c23df3a08645d07368e54eb025f6800611b13bf54b3b6f4eeec7db8d47be509c42f332536a9c6b0fa97
6
+ metadata.gz: cee69c97ed690ee1c91bcf0533b2d0c223e9213d30cc3d7357462830c7ce4f143319fcd8b21d36255c2c48933010af739d1bd47d797df02b6dd91959e12657d4
7
+ data.tar.gz: 10b06f61019908c66c34de1320ad4efe5d090599f0d79f521f787d3a8b612467435e07ac4719496532c6ea1206b10e04478a54f24e39d5f98280b60fae62563e
@@ -1,5 +1,6 @@
1
1
  require 'time'
2
2
  require 'date'
3
+ require 'ostruct'
3
4
  require 'active_support/all'
4
5
 
5
6
  class BirthdayCalculator
@@ -40,8 +41,7 @@ class BirthdayCalculator
40
41
  hh, mm = mm.divmod(60)
41
42
  dd, hh = hh.divmod(24)
42
43
 
43
- puts "It's left #{dd} days, #{hh} hours and #{mm} minutes to your birthday!"
44
- return "It's left #{dd} days, #{hh} hours and #{mm} minutes to your birthday!"
44
+ OpenStruct.new(days: dd, hours: hh, minutes: mm)
45
45
  end
46
46
 
47
47
  def modify_date(year, month, day, hour, min, sec)
@@ -58,3 +58,4 @@ class BirthdayCalculator
58
58
  end
59
59
  end
60
60
  end
61
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: birthday_calculator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Uliana Dzoba