From cb0b4fd25f8a7a541694c44edd0101a16f3bf332 Mon Sep 17 00:00:00 2001 From: ahmed-mgd Date: Thu, 12 Dec 2024 16:43:57 -0500 Subject: [PATCH] Refactor caption and category instance variables into methods --- apps/dashboard/app/apps/dev_router.rb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/dashboard/app/apps/dev_router.rb b/apps/dashboard/app/apps/dev_router.rb index 4eb88f4434..477eca9b8b 100644 --- a/apps/dashboard/app/apps/dev_router.rb +++ b/apps/dashboard/app/apps/dev_router.rb @@ -1,12 +1,10 @@ # The router class for all development apps. class DevRouter - attr_reader :name, :owner, :caption, :category + attr_reader :name, :owner def initialize(name, owner=OodSupport::Process.user.name) @name = name.to_s @owner = owner - @caption = I18n.t('dashboard.development_apps_caption') - @category = "Sandbox Apps" end # Get array of apps for specified owner @@ -38,6 +36,14 @@ def type :dev end + def caption + I18n.t('dashboard.development_apps_caption') + end + + def category + "Sandbox Apps" + end + def url "/pun/dev/#{name}" end