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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d7f3fc4e4f604bd0d703a46ece1f3c41363d3dbd7f9f3e891d0004db98863b8
4
- data.tar.gz: 021a46676cc3894badd789b189bc000f1a69025d7d2a0adb2a41a7d44d676506
3
+ metadata.gz: 5ec4481000ff50b9942da8148f1660af15473bf29a5f88dc8b3876f14cfaf1f1
4
+ data.tar.gz: d0e2ae25f2fb53c7c041800e9b8386f28d8461725501f80f279f1590df5126b1
5
5
  SHA512:
6
- metadata.gz: 38e63fbb2d5a23998d3ce32908da1ba63350ec4aeaa63074c82eb7b4658ab7c91ab893c02f357f773ccd1e0d0b8ff4739027ab20087337803d08f807724c767d
7
- data.tar.gz: cb21e7106fda18b4ca5f079a3f17fb6f17fc0d61c375e96374c5d4489ee9634a16f900236a9fc37f3cccd0206d7cf6881a649a3e1a82e0684a2e2e8dc7eb8f07
6
+ metadata.gz: 11df83e20a57e00447cdc2d58bce8a6bcaee8c3b8de70bc2c226a2bba754141c3332036518953b243d1293f473eb7d2a95d34c1adb7cd4238b4daa02fb97203b
7
+ data.tar.gz: e40de6cc45107c3eacc8de3ead08e48bb85f171f438db2635f029f39bcdf09121c71499d331798207afbb54c796140c0ed0f298058494735d9d7bd05315b6080
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.1.14 (July 31, 2021)
2
+ - calc: adding support for more param variables (a .. e)
3
+
1
4
  ## 0.1.13 (December 30, 2020)
2
5
  - small fix to #score and #index to support missing values in series
3
6
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.13
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 >= upper
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.13
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: 2020-12-30 00:00:00.000000000 Z
11
+ date: 2021-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake