Welcome to mirror list, hosted at ThFree Co, Russian Federation.

base.rb « widgets « work_items « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e7075a7a0e8e82f7a8d9778f8b37bff7cc7242b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# frozen_string_literal: true

module WorkItems
  module Widgets
    class Base
      def self.type
        name.demodulize.underscore.to_sym
      end

      def self.api_symbol
        "#{type}_widget".to_sym
      end

      def type
        self.class.type
      end

      def initialize(work_item)
        @work_item = work_item
      end

      attr_reader :work_item
    end
  end
end