fewald-worklog 0.3.16 → 0.3.17

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 (4) hide show
  1. checksums.yaml +4 -4
  2. data/.version +1 -1
  3. data/lib/hash.rb +5 -5
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e593a4c0712fbf4419176cea214fc137b9449e36a1d05e74e9bba4bc9329e106
4
- data.tar.gz: 2841ef01cf81a2f9f8c82c07918fe5ec149295d655af19031b8c98082bfe7d84
3
+ metadata.gz: daf7ba6ce29841da81257ab2588d1a0a8c5e8d676ddc1e2e128193800c0c99bd
4
+ data.tar.gz: 6be278d7cee0950a81547ed66f4e3705fae8996295c6bf6fff4ad49e2301bc7c
5
5
  SHA512:
6
- metadata.gz: 81f2d8cf8527676bc3af134b40f97252c96a464e0fa9c7aaf4f60e7e1463370d2e7cea990df87138ef67d06af4f25e987074ad71f0624abde3db6e4127f4a205
7
- data.tar.gz: b1d369a79e34f00306cde60819c5bda650edc48326b0daba96557ce8de98af18b570af461ebb1e61d7cd98cbac612af60ca01641b417c55832a7fe687ffbaf03
6
+ metadata.gz: 57dff043170f5d3bf474367a7589350d76d132140a3e3a97335d01547442401f9151b67ec21eaedf0d283f89a25184fe4e045e7c793f66043961cf41806a5379
7
+ data.tar.gz: 012ba10f1d2b98e429ccf0e8ac500022ccb10bb1b9ec75070679e91edade978539b724c855a88e339248718567e8faa89d6ac6f8adbbf008c393841672b561a9
data/.version CHANGED
@@ -1 +1 @@
1
- 0.3.16
1
+ 0.3.17
data/lib/hash.rb CHANGED
@@ -1,13 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Hashify
4
+ # Convert the object's instance variables to a hash.
5
+ # @return [Hash] the hash representation of the object
4
6
  def to_hash
5
- hash = {}
6
- instance_variables.each do |var|
7
- value = instance_variable_get(var)
8
- hash[var.to_s.delete('@')] = value
7
+ instance_variables.each_with_object({}) do |var, hash|
8
+ key = var.to_s.delete('@').to_sym
9
+ hash[key] = instance_variable_get(var)
9
10
  end
10
- hash
11
11
  end
12
12
  end
13
13
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fewald-worklog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.16
4
+ version: 0.3.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Friedrich Ewald