class Pkernel::Certificate::Owner
Attributes
country[RW]
csr[RW]
dns_names[R]
emails[R]
locality[RW]
name[RW]
org[RW]
orgUnit[RW]
serial[RW]
Public Class Methods
new()
click to toggle source
# File lib/pkernel.rb, line 31 def initialize @emails = [] @dns_names = [] end
Public Instance Methods
add_dns_names(dns)
click to toggle source
# File lib/pkernel.rb, line 40 def add_dns_names(dns) @dns_names << dns if not dns.nil? and not dns.empty? end
add_email(email)
click to toggle source
# File lib/pkernel.rb, line 36 def add_email(email) @emails << email if not email.nil? and not email.empty? end
email=(email)
click to toggle source
# File lib/pkernel.rb, line 44 def email=(email) @emails << email end
from_hash(hash)
click to toggle source
# File lib/pkernel.rb, line 48 def from_hash(hash) if not hash.nil? hash.each do |k,v| case k.downcase.to_sym when :name @name = v when :email add_email(v) when :country, :c @country = v when :org @org = v when :orgUnit, :org_unit @orgUnit = v end end end end