Class: Satis::Menus::Menu
- Inherits:
-
Object
- Object
- Satis::Menus::Menu
- Defined in:
- lib/satis/menus/menu.rb
Instance Attribute Summary collapse
-
#event ⇒ Object
readonly
Returns the value of attribute event.
-
#items ⇒ Object
readonly
Returns the value of attribute items.
-
#level ⇒ Object
readonly
Returns the value of attribute level.
-
#show_scroll ⇒ Object
readonly
Returns the value of attribute show_scroll.
Instance Method Summary collapse
-
#initialize(*args, **kwargs) {|_self| ... } ⇒ Menu
constructor
A new instance of Menu.
- #item(*args, **kwargs, &block) ⇒ Object
Constructor Details
#initialize(*args, **kwargs) {|_self| ... } ⇒ Menu
Returns a new instance of Menu.
7 8 9 10 11 12 13 14 15 |
# File 'lib/satis/menus/menu.rb', line 7 def initialize(*args, **kwargs) @options = args. @items = [] @scope = Array.wrap(args.first) @level = kwargs[:level] || 0 @event = kwargs[:event] || "mouseover" @show_scroll = kwargs[:show_scroll] || false yield self if block_given? end |
Instance Attribute Details
#event ⇒ Object (readonly)
Returns the value of attribute event.
6 7 8 |
# File 'lib/satis/menus/menu.rb', line 6 def event @event end |
#items ⇒ Object (readonly)
Returns the value of attribute items.
6 7 8 |
# File 'lib/satis/menus/menu.rb', line 6 def items @items end |
#level ⇒ Object (readonly)
Returns the value of attribute level.
6 7 8 |
# File 'lib/satis/menus/menu.rb', line 6 def level @level end |
#show_scroll ⇒ Object (readonly)
Returns the value of attribute show_scroll.
6 7 8 |
# File 'lib/satis/menus/menu.rb', line 6 def show_scroll @show_scroll end |