Class: GlobiGuard::Credential

Inherits:
Struct
  • Object
show all
Defined in:
lib/globiguard.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#environmentObject

Returns the value of attribute environment

Returns:

  • (Object)

    the current value of environment



14
15
16
# File 'lib/globiguard.rb', line 14

def environment
  @environment
end

#kindObject

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



14
15
16
# File 'lib/globiguard.rb', line 14

def kind
  @kind
end

#project_idObject

Returns the value of attribute project_id

Returns:

  • (Object)

    the current value of project_id



14
15
16
# File 'lib/globiguard.rb', line 14

def project_id
  @project_id
end

#tokenObject

Returns the value of attribute token

Returns:

  • (Object)

    the current value of token



14
15
16
# File 'lib/globiguard.rb', line 14

def token
  @token
end

Class Method Details

.local(token = nil) ⇒ Object



23
24
25
# File 'lib/globiguard.rb', line 23

def self.local(token = nil)
  new(kind: "local", project_id: nil, token: token, environment: "local")
end

.publishable(project_id, token, environment) ⇒ Object



19
20
21
# File 'lib/globiguard.rb', line 19

def self.publishable(project_id, token, environment)
  new(kind: "publishable", project_id: project_id, token: token, environment: environment)
end

.secret(project_id, token, environment) ⇒ Object



15
16
17
# File 'lib/globiguard.rb', line 15

def self.secret(project_id, token, environment)
  new(kind: "secret", project_id: project_id, token: token, environment: environment)
end