Class: InstanceMetadata::Kas

Inherits:
Object
  • Object
show all
Defined in:
app/models/instance_metadata/kas.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeKas

Returns a new instance of Kas.


6
7
8
9
10
# File 'app/models/instance_metadata/kas.rb', line 6

def initialize
  @enabled = Gitlab::Kas.enabled?
  @version = Gitlab::Kas.version if @enabled
  @external_url = Gitlab::Kas.external_url if @enabled
end

Instance Attribute Details

#enabledObject (readonly)

Returns the value of attribute enabled.


4
5
6
# File 'app/models/instance_metadata/kas.rb', line 4

def enabled
  @enabled
end

#external_urlObject (readonly)

Returns the value of attribute external_url.


4
5
6
# File 'app/models/instance_metadata/kas.rb', line 4

def external_url
  @external_url
end

#versionObject (readonly)

Returns the value of attribute version.


4
5
6
# File 'app/models/instance_metadata/kas.rb', line 4

def version
  @version
end

Class Method Details

.declarative_policy_classObject


12
13
14
# File 'app/models/instance_metadata/kas.rb', line 12

def self.declarative_policy_class
  "InstanceMetadataPolicy"
end