diff options
Diffstat (limited to 'app/models/serverless/function.rb')
-rw-r--r-- | app/models/serverless/function.rb | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/app/models/serverless/function.rb b/app/models/serverless/function.rb deleted file mode 100644 index 5d4f8e0c9e2..00000000000 --- a/app/models/serverless/function.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -module Serverless - class Function - attr_accessor :name, :namespace - - def initialize(project, name, namespace) - @project = project - @name = name - @namespace = namespace - end - - def id - @project.id.to_s + "/" + @name + "/" + @namespace - end - - def self.find_by_id(id) - array = id.split("/") - project = Project.find_by_id(array[0]) - name = array[1] - namespace = array[2] - - self.new(project, name, namespace) - end - end -end |