alacarte 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +4 -0
- data/app/helpers/alacarte_helper.rb +1 -1
- data/lib/alacarte/menu.rb +3 -1
- data/lib/alacarte/version.rb +1 -1
- metadata +3 -3
data/CHANGES
CHANGED
data/lib/alacarte/menu.rb
CHANGED
@@ -6,7 +6,7 @@ module Alacarte
|
|
6
6
|
VALID_ELEMENTS = [:link, :span]
|
7
7
|
@@env = nil
|
8
8
|
|
9
|
-
attr_reader :parent, :type, :name, :deep_name, :path, :as, :label, :options, :items, :block, :html_options, :group_options, :translation_key
|
9
|
+
attr_reader :parent, :type, :name, :deep_name, :path, :as, :label, :options, :items, :block, :html_options, :group_options, :wrapper_options, :translation_key
|
10
10
|
|
11
11
|
# Tests if an environment was set to the Alacarte::Menu
|
12
12
|
def self.env?
|
@@ -38,6 +38,7 @@ module Alacarte
|
|
38
38
|
# * +:unless+ set an inverse conditions when the menu item should be valid
|
39
39
|
# * +:html+ pass any html options that you want to be added to the menu item
|
40
40
|
# * +:group+ when the menu item has valid children, the +group+ options are passed as the html options of the grouping element
|
41
|
+
# * +:wrapper+ pass any html options that you want to add to the wrapping li item
|
41
42
|
def initialize(parent, type, *args, &block)
|
42
43
|
@options = args.last.is_a?(::Hash) ? args.pop : {}
|
43
44
|
@parent = parent
|
@@ -51,6 +52,7 @@ module Alacarte
|
|
51
52
|
@block = block if block_given?
|
52
53
|
@html_options = options[:html]
|
53
54
|
@group_options = options[:group]
|
55
|
+
@wrapper_options = options[:wrapper]
|
54
56
|
|
55
57
|
build
|
56
58
|
end
|
data/lib/alacarte/version.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 5
|
9
|
+
version: 0.0.5
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Stijn Mathysen
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-
|
17
|
+
date: 2011-09-06 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|