Commit cc02eeff authored by Lin Jen-Shin's avatar Lin Jen-Shin

Move initialize method later.

parent ada39be6
......@@ -6,13 +6,13 @@ module QA
class RSAKey
extend Forwardable
attr_reader :key
def_delegators :@key, :fingerprint
def initialize(bits = 4096)
@key = OpenSSL::PKey::RSA.new(bits)
end
attr_reader :key
def_delegators :@key, :fingerprint
def public_key
@public_key ||= "#{key.ssh_type} #{[key.to_blob].pack('m0')}"
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment