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

Move initialize method later.

parent ada39be6
...@@ -6,13 +6,13 @@ module QA ...@@ -6,13 +6,13 @@ module QA
class RSAKey class RSAKey
extend Forwardable extend Forwardable
attr_reader :key
def_delegators :@key, :fingerprint
def initialize(bits = 4096) def initialize(bits = 4096)
@key = OpenSSL::PKey::RSA.new(bits) @key = OpenSSL::PKey::RSA.new(bits)
end end
attr_reader :key
def_delegators :@key, :fingerprint
def public_key def public_key
@public_key ||= "#{key.ssh_type} #{[key.to_blob].pack('m0')}" @public_key ||= "#{key.ssh_type} #{[key.to_blob].pack('m0')}"
end 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