Skip to content

Commit

Permalink
Refactor caption and category instance variables into methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmed-mgd committed Dec 12, 2024
1 parent 99bf2d9 commit cb0b4fd
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions apps/dashboard/app/apps/dev_router.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit cb0b4fd

Please sign in to comment.