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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +10 -9
- data/lib/bsflow/combine.rb +8 -3
- data/lib/bsflow/version.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: 606e0820227cdea3478b20df534536f7e6ad6713fd90ad5283e4cbc5501682b3
|
4
|
+
data.tar.gz: a5a207ff5266c4412a6c07b7bd3f4c65b6790ef052992c72300d990bbf6964dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 710e1a65316b98f4ce14ea1946a33afa24f9cc9952457fa22303d4c622dff3dadd4eff86796ab36266fc2d6a869a69d33b5ab9d1312dcf1f8950b67b1219bbf5
|
7
|
+
data.tar.gz: 709004f1c5233bf51a7e183bf84b9b18c36fc7d4ba51d5931ca441cbdb253e37d208e31e49df1a18b073fbb95579d995f3fd0ba664ab6b305bf88e02ef367714
|
data/Gemfile.lock
CHANGED
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
|
436
|
-
|
437
|
-
|
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
|
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
|
-
- **
|
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
|
data/lib/bsflow/combine.rb
CHANGED
@@ -1,8 +1,13 @@
|
|
1
1
|
module BSFlow
|
2
2
|
class Combine
|
3
|
-
def initialize(*args, combine_proc
|
4
|
-
|
5
|
-
|
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)
|
data/lib/bsflow/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2018-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|