Sha256: ba7832745425384cd08f4c0666013e0953af9b26b81e9e31c2e56b6bb9d9c511

Contents?: true

Size: 558 Bytes

Versions: 3

Compression:

Stored size: 558 Bytes

Contents

module AdminCore
  module ViewObject
    class SidebarResourceLink
      # @param resource_manager [AdminCore::BaseResourceManager]
      def initialize(resource_manager)
        @resource_manager = resource_manager
      end

      def to_hash
        {
          displayName: resource_manager_hash[:displayName],
          link: resource_manager_hash[:indexPath],
          external: false,
          type: 'link'
        }
      end

      def resource_manager_hash
        @resource_manager_hash ||= @resource_manager.to_hash
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
admin_core-0.0.3 lib/admin_core/view_object/sidebar_resource_link.rb
admin_core-0.0.2 lib/admin_core/view_object/sidebar_resource_link.rb
admin_core-0.0.1 lib/admin_core/view_object/sidebar_resource_link.rb