biggs 0.5.0 → 0.5.1

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: 1a72bbb059021e59607a682f9fbb7afb229c8eb36a4ac7b08ba8cf867455f050
4
- data.tar.gz: acec60971691c1ca1f72380e7ac1b81bb49ff14b02db4bea188a7a8ac57c5451
3
+ metadata.gz: b305ad58e72593f21215121377ae70f2d17bd29a2d61f3265230f44c9e0c3092
4
+ data.tar.gz: 34566de6851e95ebc713110a6822498fa9da24c5fed7e158a7f53676ce11ce51
5
5
  SHA512:
6
- metadata.gz: 1399a47f9f556a04f1362ac940b12965d233cc628d5197e7800f24c42400390b369dbcf88e20e2f16424638b704f83df9ace8d42420f213eb197e9618f4a457b
7
- data.tar.gz: 67ed056b8cf7ace58a9426f493816cbb1575cd2af0c4c86bc1543a599246fd27725503c8035bef493ff4c7e51f910f037892a9dcf64a5831a040368eefe4a2cb
6
+ metadata.gz: 34c29129d47a847e79e81793724f57a06ad89955004f240f154c491cb5bb7a35c68d49d7af52e9c66c609fae7335c5b2d7733f515287d7f7f68145e86665c845
7
+ data.tar.gz: 577f6f7d55229a2f5c3e6a9b0b4d5dd5badb488551da4ec6eadf8189ac6dd1ab4ab9ef56e176c2308fd9dd7eff29db9a8698157279a1cb4976e814bb7053e4f8
data/CHANGES.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ### dev
2
2
 
3
+ ### 0.5.1 / 2022-04-08
4
+
5
+ * Biggs::Extractor: small refactorings + don't delete options
6
+
3
7
  ### 0.5.0 / 2022-04-08
4
8
 
5
9
  * Refactored Biggs::Concern to use Biggs::Extractor
@@ -1,18 +1,17 @@
1
1
  module Biggs
2
2
  class Extractor
3
3
  def initialize(options)
4
- @value_methods = {}
5
- Biggs::Formatter::FIELDS.each do |field|
6
- @value_methods[field] = options.delete(field) if options[field]
4
+ @value_methods = Biggs::Formatter::FIELDS.reduce({}) do |methods, field|
5
+ methods[field] = options[field] if options[field]
6
+ methods
7
7
  end
8
8
  end
9
9
 
10
10
  def get_values(instance)
11
- values = {}
12
- Biggs::Formatter::FIELDS_WO_COUNTRY.each do |field|
11
+ Biggs::Formatter::FIELDS_WO_COUNTRY.inject({}) do |values, field|
13
12
  values[field] = get_value(instance, field)
13
+ values
14
14
  end
15
- values
16
15
  end
17
16
 
18
17
  def get_value(instance, field)
data/lib/biggs/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Biggs
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: biggs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Munz