Class: Pkernel::Certificate::Owner
- Inherits:
-
Object
- Object
- Pkernel::Certificate::Owner
- Defined in:
- lib/pkernel.rb
Instance Attribute Summary collapse
-
#country ⇒ Object
Returns the value of attribute country.
-
#csr ⇒ Object
Returns the value of attribute csr.
-
#dns_names ⇒ Object
readonly
Returns the value of attribute dns_names.
-
#emails ⇒ Object
readonly
Returns the value of attribute emails.
-
#locality ⇒ Object
Returns the value of attribute locality.
-
#name ⇒ Object
Returns the value of attribute name.
-
#org ⇒ Object
Returns the value of attribute org.
-
#orgUnit ⇒ Object
Returns the value of attribute orgUnit.
-
#serial ⇒ Object
Returns the value of attribute serial.
Instance Method Summary collapse
- #add_dns_names(dns) ⇒ Object
- #add_email(email) ⇒ Object
- #email=(email) ⇒ Object
- #from_hash(hash) ⇒ Object
-
#initialize ⇒ Owner
constructor
A new instance of Owner.
Constructor Details
#initialize ⇒ Owner
Returns a new instance of Owner.
31 32 33 34 |
# File 'lib/pkernel.rb', line 31 def initialize @emails = [] @dns_names = [] end |
Instance Attribute Details
#country ⇒ Object
Returns the value of attribute country.
28 29 30 |
# File 'lib/pkernel.rb', line 28 def country @country end |
#csr ⇒ Object
Returns the value of attribute csr.
28 29 30 |
# File 'lib/pkernel.rb', line 28 def csr @csr end |
#dns_names ⇒ Object (readonly)
Returns the value of attribute dns_names.
29 30 31 |
# File 'lib/pkernel.rb', line 29 def dns_names @dns_names end |
#emails ⇒ Object (readonly)
Returns the value of attribute emails.
29 30 31 |
# File 'lib/pkernel.rb', line 29 def emails @emails end |
#locality ⇒ Object
Returns the value of attribute locality.
28 29 30 |
# File 'lib/pkernel.rb', line 28 def locality @locality end |
#name ⇒ Object
Returns the value of attribute name.
28 29 30 |
# File 'lib/pkernel.rb', line 28 def name @name end |
#org ⇒ Object
Returns the value of attribute org.
28 29 30 |
# File 'lib/pkernel.rb', line 28 def org @org end |
#orgUnit ⇒ Object
Returns the value of attribute orgUnit.
28 29 30 |
# File 'lib/pkernel.rb', line 28 def orgUnit @orgUnit end |
#serial ⇒ Object
Returns the value of attribute serial.
28 29 30 |
# File 'lib/pkernel.rb', line 28 def serial @serial end |
Instance Method Details
#add_dns_names(dns) ⇒ Object
40 41 42 |
# 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) ⇒ Object
36 37 38 |
# File 'lib/pkernel.rb', line 36 def add_email(email) @emails << email if not email.nil? and not email.empty? end |
#email=(email) ⇒ Object
44 45 46 |
# File 'lib/pkernel.rb', line 44 def email=(email) @emails << email end |
#from_hash(hash) ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# 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 |