actionnav 1.1.0 → 1.2.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/lib/action_nav/base.rb +15 -0
- data/lib/action_nav/item_instance.rb +1 -1
- data/lib/action_nav/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b42909b04fcc4c81f604aaee142e8fbd27371f7c59568f0a0acf695c6610843a
|
4
|
+
data.tar.gz: ee1bd67e110480eaab050f7dc51b3ad4a01fb5e838a8cf4e75d59a014ac15588
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 332bbcf82df0fb68b1c13a6a7f27387ad18734f03d07dd325838e792ecdc79ad7e54299551634ef3c1d4d5a62d94a8a69feff7cbf00ac5c30d12c153f8e331cd
|
7
|
+
data.tar.gz: 38eaefc923ba32c4c66effb9b2dcff8d69a8ccbfddb3e6d40f1d8de200bcfee01ebd63efa66a5261d007f5a153f6e70a4782deae4c26dcd863d9cff20ae9ac90
|
data/lib/action_nav/base.rb
CHANGED
@@ -12,6 +12,7 @@ module ActionNav
|
|
12
12
|
def initialize(controller)
|
13
13
|
@controller = controller
|
14
14
|
@active_paths = []
|
15
|
+
@context = {}
|
15
16
|
end
|
16
17
|
|
17
18
|
# The controller that initialized this navigation.
|
@@ -20,6 +21,11 @@ module ActionNav
|
|
20
21
|
attr_reader :controller
|
21
22
|
attr_reader :active_paths
|
22
23
|
|
24
|
+
# The context for this navigation.
|
25
|
+
#
|
26
|
+
# @return [Hash]
|
27
|
+
attr_reader :context
|
28
|
+
|
23
29
|
# Return a full list of items for this instance as
|
24
30
|
# instances.
|
25
31
|
#
|
@@ -50,6 +56,15 @@ module ActionNav
|
|
50
56
|
end
|
51
57
|
end
|
52
58
|
|
59
|
+
# Add context to this navigation.
|
60
|
+
#
|
61
|
+
# @param key [Symbol]
|
62
|
+
# @param value [Object]
|
63
|
+
# @return [Hash]
|
64
|
+
def add_context(key, value)
|
65
|
+
@context[key] = value
|
66
|
+
end
|
67
|
+
|
53
68
|
# Add a new item to this navigation
|
54
69
|
#
|
55
70
|
# @param id [Symbol]
|
data/lib/action_nav/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actionnav
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Cooke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -60,7 +60,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
requirements: []
|
63
|
-
rubygems_version: 3.3.
|
63
|
+
rubygems_version: 3.3.27
|
64
64
|
signing_key:
|
65
65
|
specification_version: 4
|
66
66
|
summary: This gem provides a friendly way to manage application navigation.
|