Class: AdminCore::ViewObject::SidebarDropdown
- Inherits:
-
Object
- Object
- AdminCore::ViewObject::SidebarDropdown
- Defined in:
- lib/admin_core/view_object/sidebar_dropdown.rb
Instance Method Summary collapse
-
#initialize(name, links) ⇒ SidebarDropdown
constructor
A new instance of SidebarDropdown.
- #to_hash ⇒ Object
Constructor Details
#initialize(name, links) ⇒ SidebarDropdown
Returns a new instance of SidebarDropdown.
6 7 8 9 |
# File 'lib/admin_core/view_object/sidebar_dropdown.rb', line 6 def initialize(name, links) @name = name @links = links end |
Instance Method Details
#to_hash ⇒ Object
Note:
Implements SidebarDropdown flow type
12 13 14 15 16 17 18 |
# File 'lib/admin_core/view_object/sidebar_dropdown.rb', line 12 def to_hash { displayName: @name, links: @links, type: 'dropdown' } end |