Class: AdminCore::ViewObject::SidebarResourceLink
- Inherits:
-
Object
- Object
- AdminCore::ViewObject::SidebarResourceLink
- Defined in:
- lib/admin_core/view_object/sidebar_resource_link.rb
Instance Method Summary collapse
-
#initialize(resource_manager) ⇒ SidebarResourceLink
constructor
A new instance of SidebarResourceLink.
- #resource_manager_hash ⇒ Object
- #to_hash ⇒ Object
Constructor Details
#initialize(resource_manager) ⇒ SidebarResourceLink
Returns a new instance of SidebarResourceLink.
5 6 7 |
# File 'lib/admin_core/view_object/sidebar_resource_link.rb', line 5 def initialize(resource_manager) @resource_manager = resource_manager end |
Instance Method Details
#resource_manager_hash ⇒ Object
18 19 20 |
# File 'lib/admin_core/view_object/sidebar_resource_link.rb', line 18 def resource_manager_hash @resource_manager_hash ||= @resource_manager.to_hash end |
#to_hash ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/admin_core/view_object/sidebar_resource_link.rb', line 9 def to_hash { displayName: resource_manager_hash[:displayName], link: resource_manager_hash[:indexPath], external: false, type: 'link' } end |