Class: Key

Inherits:
OpenShift::Model
  • Object
show all
Includes:
ActiveModel::Validations
Defined in:
app/models/key.rb

Constant Summary collapse

VALID_SSH_KEY_TYPES =
['ssh-rsa', 'ssh-dss', '[email protected]', '[email protected]',
'[email protected]', '[email protected]', '[email protected]',
'[email protected]', '[email protected]', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', 'ecdsa-sha2-nistp521']
DEFAULT_SSH_KEY_TYPE =
"ssh-rsa"
DEFAULT_SSH_KEY_NAME =
"default"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, type, content) ⇒ Key

Returns a new instance of Key.



15
16
17
18
19
# File 'app/models/key.rb', line 15

def initialize(name, type, content)
  self.name = name
  self.type = type
  self.content = content
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



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

def content
  @content
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#typeObject

Returns the value of attribute type.



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

def type
  @type
end