Class: Rudy::AWS::EC2::KeyPair

Inherits:
Storable
  • Object
show all
Defined in:
lib/rudy/aws/ec2/keypair.rb

Instance Method Summary collapse

Instance Method Details

#liner_noteObject



11
12
13
# File 'lib/rudy/aws/ec2/keypair.rb', line 11

def liner_note
  "%-20s   %s" % [self.name.bright, self.fingerprint]
end

#public_keyObject



20
21
22
23
24
# File 'lib/rudy/aws/ec2/keypair.rb', line 20

def public_key
  return unless @private_key
  k = Rye::Key.new(@private_key)
  k.public_key.to_ssh2
end

#to_s(titles = false) ⇒ Object



15
16
17
18
# File 'lib/rudy/aws/ec2/keypair.rb', line 15

def to_s(titles=false)
  str = titles ? "%-20s   %s#{$/}" % ['name', 'fingerprint'] : ""
  str << liner_note
end