Class: Madmin::Menu::Item
Instance Attribute Summary collapse
-
#children ⇒ Object
readonly
Returns the value of attribute children.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
-
#position ⇒ Object
readonly
Returns the value of attribute position.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(label:, url: nil, position: 99, parent: nil, **options) ⇒ Item
constructor
A new instance of Item.
Methods included from Node
Constructor Details
#initialize(label:, url: nil, position: 99, parent: nil, **options) ⇒ Item
Returns a new instance of Item.
60 61 62 63 64 65 66 67 |
# File 'lib/madmin/menu.rb', line 60 def initialize(label:, url: nil, position: 99, parent: nil, **) @label = label @url = url @position = position @parent = parent @if = .delete(:if) @children = {} end |
Instance Attribute Details
#children ⇒ Object (readonly)
Returns the value of attribute children.
58 59 60 |
# File 'lib/madmin/menu.rb', line 58 def children @children end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
58 59 60 |
# File 'lib/madmin/menu.rb', line 58 def label @label end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
58 59 60 |
# File 'lib/madmin/menu.rb', line 58 def parent @parent end |
#position ⇒ Object (readonly)
Returns the value of attribute position.
58 59 60 |
# File 'lib/madmin/menu.rb', line 58 def position @position end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
58 59 60 |
# File 'lib/madmin/menu.rb', line 58 def url @url end |