onboardable 1.3.0 → 1.3.1
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/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/onboardable/list/builder.rb +9 -3
- data/lib/onboardable/version.rb +1 -1
- data/sig/onboardable/list/builder.rbs +2 -0
- 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: 64a5fbb1b0cfbe18fc1ed5060581fa138f726e52d9eac213ccfc4ac58d9c9a41
|
4
|
+
data.tar.gz: 7d7bf373308e6ca7f82afceb7d658ac5e5e960099e68de343b65bb2fdf918279
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6aa13416b3f767daeab45c7e4c5fa48a5895eaf9929da9eab25848c5956c805f2a193aa7d78e9b7e2fc7721b9e53618b10705f5f73adadab549ed14d8253e4b5
|
7
|
+
data.tar.gz: 828fe6ada70d330175d6e71eaf6b4b7506e1f1fb9e829f4a2a82fbf66692cd3de14388667c5ebff8779420038d92ef5b519f0cae7d8c97b43cf2a490fed0111e
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -6,11 +6,13 @@ module Onboardable
|
|
6
6
|
class Builder
|
7
7
|
include Utils::Warnings
|
8
8
|
|
9
|
+
STEP_KEY = :steps
|
10
|
+
|
9
11
|
# Stores the steps added to the builder.
|
10
12
|
#
|
11
13
|
# @return [Hash] A hash of steps added to the builder.
|
12
14
|
def steps
|
13
|
-
options[
|
15
|
+
options[STEP_KEY] ||= {}
|
14
16
|
end
|
15
17
|
|
16
18
|
# @return [Step] The current step in the building process, defaulting to the first added step.
|
@@ -45,7 +47,11 @@ module Onboardable
|
|
45
47
|
# @param current_step_name [String, nil] The name of the current step.
|
46
48
|
# @return [Base] A new List object initialized with the steps and the specified current step.
|
47
49
|
def build(current_step_name = nil)
|
48
|
-
Base.new(
|
50
|
+
Base.new(
|
51
|
+
convert_to_steps!,
|
52
|
+
convert_to_step!(current_step_name || current_step.name),
|
53
|
+
options.except(STEP_KEY)
|
54
|
+
)
|
49
55
|
end
|
50
56
|
|
51
57
|
private
|
@@ -57,7 +63,7 @@ module Onboardable
|
|
57
63
|
#
|
58
64
|
# @param options [Hash] The options hash to be set.
|
59
65
|
def options=(options)
|
60
|
-
@options = Hash(options)
|
66
|
+
@options = Hash(options).except(STEP_KEY)
|
61
67
|
end
|
62
68
|
|
63
69
|
# Adds a step to the builder.
|
data/lib/onboardable/version.rb
CHANGED