Class: BuildTool::SshKey

Inherits:
Object
  • Object
show all
Defined in:
lib/build-tool/sshkey.rb

Overview

Encapsulates a ssh key

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, file = nil) ⇒ SshKey

Returns a new instance of SshKey.



9
10
11
12
# File 'lib/build-tool/sshkey.rb', line 9

def initialize(name, file = nil)
    @name = name
    @file = file
end

Instance Attribute Details

#fileObject

Returns the value of attribute file.



16
17
18
# File 'lib/build-tool/sshkey.rb', line 16

def file
  @file
end

#nameObject (readonly)

Returns the value of attribute name.



14
15
16
# File 'lib/build-tool/sshkey.rb', line 14

def name
  @name
end

Instance Method Details

#to_sObject



18
19
20
# File 'lib/build-tool/sshkey.rb', line 18

def to_s
    @file
end