bsflow 2.5.0 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f346f3299babeef06c81665529633d10f7a13700adc683d8e123f1d72bbd5bb2
4
- data.tar.gz: 3f37d78b4690a7094bcac06c90db5ca5cfdad4ef92f18c96d10a2f7e2cf1a78c
3
+ metadata.gz: 606e0820227cdea3478b20df534536f7e6ad6713fd90ad5283e4cbc5501682b3
4
+ data.tar.gz: a5a207ff5266c4412a6c07b7bd3f4c65b6790ef052992c72300d990bbf6964dc
5
5
  SHA512:
6
- metadata.gz: 6c58e17dc27c030fd69ea7aef3fad7a3fac5ee54fa5ec2faf85d5613feb71c2b3ac10257b78b6c7421f6e92ae1d07a162f9e04dae402be128c457a704177ed04
7
- data.tar.gz: 5561afb015a07a91a3b2d6add02a2f6e8435b91ba2d0cab042a74b30d64b43e9f83dca8eea536800b08ffe732aeb52d626a5bfc351ae8bdff35643ed383f2ddf
6
+ metadata.gz: 710e1a65316b98f4ce14ea1946a33afa24f9cc9952457fa22303d4c622dff3dadd4eff86796ab36266fc2d6a869a69d33b5ab9d1312dcf1f8950b67b1219bbf5
7
+ data.tar.gz: 709004f1c5233bf51a7e183bf84b9b18c36fc7d4ba51d5931ca441cbdb253e37d208e31e49df1a18b073fbb95579d995f3fd0ba664ab6b305bf88e02ef367714
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bsflow (2.4.0)
4
+ bsflow (2.5.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -432,9 +432,14 @@ Source code:
432
432
  ```ruby
433
433
  module BSFlow
434
434
  class Combine
435
- def initialize(*args, combine_proc:, sub_procs: [])
436
- @sub_procs = args + sub_procs
437
- @combine_proc = combine_proc
435
+ def initialize(*args, combine_proc: nil, sub_procs: [])
436
+ if combine_proc
437
+ @sub_procs = sub_procs
438
+ @combine_proc = combine_proc
439
+ else
440
+ @sub_procs = args[0..-2]
441
+ @combine_proc = args.last
442
+ end
438
443
  end
439
444
 
440
445
  def call(*args)
@@ -446,7 +451,6 @@ module BSFlow
446
451
  end
447
452
  end
448
453
  end
449
-
450
454
  ```
451
455
 
452
456
  #### Require
@@ -461,16 +465,13 @@ require "bsflow/combine"
461
465
  BSFlow::Combine.new(sub_procs: sub_procs, combine_proc: combine_proc) # => new_combine
462
466
 
463
467
  # or
464
- BSFlow::Combine.new(*sub_procs, combine_proc: combine_proc) # => new_combine
465
-
466
- # or
467
- BSFlow::Combine.new(*first_part_of_sub_procs, sub_procs: rest_of_sub_procs, combine_proc: combine_proc) # => new_combine
468
+ BSFlow::Combine.new(*sub_procs, combine_proc) # => new_combine
468
469
  ```
469
470
 
470
471
  Paramaters:
471
472
 
472
473
  - **_sub_procs_** - an array of procs or objects responding on `.call` message. Each of them takes arguments from combine object's call method and return an output. All aoutpus are pased to **_combine_proc_**.
473
- - **_combine_procs_** - a proc or object responding on `.call` message. The output of this proc is the output of the `.call` method of the **Combine** class.
474
+ - **_combine_proc_** - a proc or object responding on `.call` message. The output of this proc is the output of the `.call` method of the **Combine** class.
474
475
 
475
476
 
476
477
  ### Class BSFlow::UntilTrueLoop
@@ -1,8 +1,13 @@
1
1
  module BSFlow
2
2
  class Combine
3
- def initialize(*args, combine_proc:, sub_procs: [])
4
- @sub_procs = args + sub_procs
5
- @combine_proc = combine_proc
3
+ def initialize(*args, combine_proc: nil, sub_procs: [])
4
+ if combine_proc
5
+ @sub_procs = sub_procs
6
+ @combine_proc = combine_proc
7
+ else
8
+ @sub_procs = args[0..-2]
9
+ @combine_proc = args.last
10
+ end
6
11
  end
7
12
 
8
13
  def call(*args)
@@ -1,3 +1,3 @@
1
1
  module BSFlow
2
- VERSION = "2.5.0"
2
+ VERSION = "2.6.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bsflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bartłomiej Sielski
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-11-05 00:00:00.000000000 Z
11
+ date: 2018-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler