Class: Admix::Navigation::Menu

Inherits:
Object
  • Object
show all
Defined in:
lib/admix/navigation/menu.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMenu

Returns a new instance of Menu.



6
7
8
# File 'lib/admix/navigation/menu.rb', line 6

def initialize
  @children = []
end

Instance Attribute Details

#can_renderObject

Returns the value of attribute can_render.



4
5
6
# File 'lib/admix/navigation/menu.rb', line 4

def can_render
  @can_render
end

#childrenObject

Returns the value of attribute children.



4
5
6
# File 'lib/admix/navigation/menu.rb', line 4

def children
  @children
end

#iconObject

Returns the value of attribute icon.



4
5
6
# File 'lib/admix/navigation/menu.rb', line 4

def icon
  @icon
end

#keyObject

Returns the value of attribute key.



4
5
6
# File 'lib/admix/navigation/menu.rb', line 4

def key
  @key
end

#parentObject

Returns the value of attribute parent.



4
5
6
# File 'lib/admix/navigation/menu.rb', line 4

def parent
  @parent
end

#titleObject

Returns the value of attribute title.



4
5
6
# File 'lib/admix/navigation/menu.rb', line 4

def title
  @title
end

#urlObject

Returns the value of attribute url.



4
5
6
# File 'lib/admix/navigation/menu.rb', line 4

def url
  @url
end

Instance Method Details

Yields:



10
11
12
13
14
15
16
17
# File 'lib/admix/navigation/menu.rb', line 10

def submenu
  submenu = Admix::Navigation::Menu.new
  submenu.parent = self

  yield submenu if block_given?

  @children << submenu
end