Class: Ccrypto::X509NameInfo
- Inherits:
-
Object
- Object
- Ccrypto::X509NameInfo
- Includes:
- TR::CondUtils
- Defined in:
- lib/ccrypto/java/ext/x509_cert.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#org ⇒ Object
readonly
Returns the value of attribute org.
-
#org_unit ⇒ Object
readonly
Returns the value of attribute org_unit.
Instance Method Summary collapse
- #email=(val) ⇒ Object
- #emails ⇒ Object
- #has_email?(name) ⇒ Boolean
-
#initialize(x500name) ⇒ X509NameInfo
constructor
A new instance of X509NameInfo.
- #to_s ⇒ Object
Constructor Details
#initialize(x500name) ⇒ X509NameInfo
Returns a new instance of X509NameInfo.
16 17 18 19 |
# File 'lib/ccrypto/java/ext/x509_cert.rb', line 16 def initialize(x500name) @x500Name = x500name extract end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
14 15 16 |
# File 'lib/ccrypto/java/ext/x509_cert.rb', line 14 def name @name end |
#org ⇒ Object (readonly)
Returns the value of attribute org.
14 15 16 |
# File 'lib/ccrypto/java/ext/x509_cert.rb', line 14 def org @org end |
#org_unit ⇒ Object (readonly)
Returns the value of attribute org_unit.
14 15 16 |
# File 'lib/ccrypto/java/ext/x509_cert.rb', line 14 def org_unit @org_unit end |
Instance Method Details
#email=(val) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/ccrypto/java/ext/x509_cert.rb', line 21 def email=(val) if val.is_a?(Array) emails.concat(val) else emails << val end end |
#emails ⇒ Object
29 30 31 32 33 34 |
# File 'lib/ccrypto/java/ext/x509_cert.rb', line 29 def emails if @_emails.nil? @_emails = [] end @_emails end |
#has_email?(name) ⇒ Boolean
36 37 38 |
# File 'lib/ccrypto/java/ext/x509_cert.rb', line 36 def has_email?(name) emails.include?(name) end |
#to_s ⇒ Object
40 41 42 |
# File 'lib/ccrypto/java/ext/x509_cert.rb', line 40 def to_s @x500Name.toString end |