mas-rad_core 0.0.84 → 0.0.85
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mas/firm_result.rb +6 -0
- data/lib/mas/rad_core/version.rb +1 -1
- data/spec/dummy/log/test.log +73728 -0
- data/spec/lib/mas/firm_result_spec.rb +26 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a58be5d085e412c6058a1eeabad3dd65ab20a06e
|
4
|
+
data.tar.gz: 1d72bc40d1aba2b6b6bd15844bcc7e096fac1a84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8eb29c436faf7b0b7bf2f39f219e71ab7dcca12c33cb18b57cb44b9b4c555cc8c43cb8ce6a91892b96bfd53eb302115e49b60ded4f593307dc5a8acdcf471643
|
7
|
+
data.tar.gz: bfbfb9e3cdc04d8576f2f00b2e1ed6cb4c2d74efdbda3eb17ea880fae54408f2a9853c40376fd39636fe45ddedfd338b1809e8f6db7a1c0afe359d1a4eafed3a
|
data/lib/mas/firm_result.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
require 'uk_phone_numbers'
|
2
2
|
|
3
3
|
class FirmResult
|
4
|
+
PERCENTAGE_FOR_TRUE = 100
|
5
|
+
|
4
6
|
LESS_THAN_FIFTY_K_ID = 1
|
5
7
|
|
6
8
|
DIRECTLY_MAPPED_FIELDS = [
|
@@ -53,6 +55,10 @@ class FirmResult
|
|
53
55
|
@advisers.map { |adviser_data| AdviserResult.new(adviser_data) }
|
54
56
|
end
|
55
57
|
|
58
|
+
def includes_advice_type?(advice_type)
|
59
|
+
public_send(advice_type) == PERCENTAGE_FOR_TRUE
|
60
|
+
end
|
61
|
+
|
56
62
|
def types_of_advice
|
57
63
|
TYPES_OF_ADVICE_FIELDS.select { |field| public_send(field).nonzero? }
|
58
64
|
end
|
data/lib/mas/rad_core/version.rb
CHANGED