cotcube-indicators 0.1.13 → 0.1.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/VERSION +1 -1
- data/lib/cotcube-indicators/calc.rb +2 -2
- data/lib/cotcube-indicators/threshold.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ec4481000ff50b9942da8148f1660af15473bf29a5f88dc8b3876f14cfaf1f1
|
4
|
+
data.tar.gz: d0e2ae25f2fb53c7c041800e9b8386f28d8461725501f80f279f1590df5126b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11df83e20a57e00447cdc2d58bce8a6bcaee8c3b8de70bc2c226a2bba754141c3332036518953b243d1293f473eb7d2a95d34c1adb7cd4238b4daa02fb97203b
|
7
|
+
data.tar.gz: e40de6cc45107c3eacc8de3ead08e48bb85f171f438db2635f029f39bcdf09121c71499d331798207afbb54c796140c0ed0f298058494735d9d7bd05315b6080
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.14
|
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
module Cotcube
|
4
4
|
module Indicators
|
5
|
-
def calc(a:, b:, &block) # rubocop:disable Naming/MethodParameterName
|
5
|
+
def calc(a:, b:, c:nil, d:nil, e:nil, &block) # rubocop:disable Naming/MethodParameterName
|
6
6
|
lambda do |x|
|
7
|
-
block.call(x[a.to_sym], x[b.to_sym]).to_f
|
7
|
+
block.call(x[a.to_sym], x[b.to_sym], x[c.to_sym], x[d.to_sym], x[e.to_sym]).to_f
|
8
8
|
end
|
9
9
|
end
|
10
10
|
end
|
@@ -7,7 +7,7 @@ module Cotcube
|
|
7
7
|
raise ArgumentError, "Need to set :upper: (set to Float::INFINITY to omit)" if upper.nil?
|
8
8
|
raise ArgumentError, "Need to set :lower unless :abs is set" if lower.nil? and not abs
|
9
9
|
raise ArgumentError, ":lower, upper must be numeric" if not upper.is_a?(Numeric) and ( abs ? true : lower.is_a?(Numeric) )
|
10
|
-
raise ArgumentError, "Found bogus, :lower #{lower} must be lower than :upper #{upper}" if not abs and lower
|
10
|
+
raise ArgumentError, "Found bogus, :lower #{lower} must be lower than :upper #{upper}" if not abs and lower > upper
|
11
11
|
# For this indicator, we just need to remembers -1, 0 or 1. That does not need a helper class.
|
12
12
|
carrier = 0
|
13
13
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cotcube-indicators
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benjamin L. Tischendorf
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|