steppy 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/steppy.rb +18 -0
- data/lib/steppy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 987fb5fa5cd7883b0604fb5c0d29ca5bb955d4d34f9d53e21406ab78fbb5f40c
|
4
|
+
data.tar.gz: c9f3778df2fd3edaf6a2b3daa12cf69deb35f876eecc8911ceebe8c488192452
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: daa02f43a1ad9615b1a1508c0b7fad026786131d2d4a6dd22b572dbea4b5e6ee1c8cce0ede8ea06a805a25d56c96e408c9d82d45d5e9be53bb4323e671274e37
|
7
|
+
data.tar.gz: 1cc10dee46a0c168e8a42923cc3f5322bc892ce62ac0f443b4231ce843a390f611f6ab2eda47d608db781f0d3222ba84ff4d1a6f69ad0c6458d5d1d1760bd2ce
|
data/Gemfile.lock
CHANGED
data/lib/steppy.rb
CHANGED
@@ -144,6 +144,24 @@ module Steppy
|
|
144
144
|
|
145
145
|
alias step_return step
|
146
146
|
|
147
|
+
def step_if_else(condition_block, step_steps, args = {})
|
148
|
+
if_step, else_step = step_steps
|
149
|
+
|
150
|
+
steppy_run_step Steppy.parse_step(
|
151
|
+
method: if_step,
|
152
|
+
args: {
|
153
|
+
if: condition_block,
|
154
|
+
}.merge(args)
|
155
|
+
)
|
156
|
+
|
157
|
+
steppy_run_step Steppy.parse_step(
|
158
|
+
method: else_step,
|
159
|
+
args: {
|
160
|
+
unless: condition_block,
|
161
|
+
}.merge(args)
|
162
|
+
)
|
163
|
+
end
|
164
|
+
|
147
165
|
def step_if(condition, &block)
|
148
166
|
steppy_run_condition_block condition, block
|
149
167
|
end
|
data/lib/steppy/version.rb
CHANGED