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 +4 -4
- data/CHANGES.md +4 -0
- data/lib/biggs/extractor.rb +5 -6
- data/lib/biggs/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b305ad58e72593f21215121377ae70f2d17bd29a2d61f3265230f44c9e0c3092
|
4
|
+
data.tar.gz: 34566de6851e95ebc713110a6822498fa9da24c5fed7e158a7f53676ce11ce51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34c29129d47a847e79e81793724f57a06ad89955004f240f154c491cb5bb7a35c68d49d7af52e9c66c609fae7335c5b2d7733f515287d7f7f68145e86665c845
|
7
|
+
data.tar.gz: 577f6f7d55229a2f5c3e6a9b0b4d5dd5badb488551da4ec6eadf8189ac6dd1ab4ab9ef56e176c2308fd9dd7eff29db9a8698157279a1cb4976e814bb7053e4f8
|
data/CHANGES.md
CHANGED
data/lib/biggs/extractor.rb
CHANGED
@@ -1,18 +1,17 @@
|
|
1
1
|
module Biggs
|
2
2
|
class Extractor
|
3
3
|
def initialize(options)
|
4
|
-
@value_methods = {}
|
5
|
-
|
6
|
-
|
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