Class: AdminCore::ViewObject::SidebarDropdown

Inherits:
Object
  • Object
show all
Defined in:
lib/admin_core/view_object/sidebar_dropdown.rb

Instance Method Summary collapse

Constructor Details

#initialize(name, links) ⇒ SidebarDropdown

Returns a new instance of SidebarDropdown.

Parameters:



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_hashObject

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