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

variable.rb « entities « api « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6705df30b2e54253a5a52a5962483d2be0b534f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# frozen_string_literal: true

module API
  module Entities
    class Variable < Grape::Entity
      expose :variable_type, :key, :value
      expose :protected?, as: :protected, if: -> (entity, _) { entity.respond_to?(:protected?) }
      expose :masked?, as: :masked, if: -> (entity, _) { entity.respond_to?(:masked?) }
      expose :environment_scope, if: -> (entity, _) { entity.respond_to?(:environment_scope) }
    end
  end
end