Class: OpenSSL::X509::Extension

Inherits:
Object
  • Object
show all
Defined in:
lib/openssl/x509.rb,
lib/openssl/dummy.rb

Instance Method Summary collapse

Instance Method Details

#to_aObject



59
60
61
# File 'lib/openssl/x509.rb', line 59

def to_a
  [ self.oid, self.value, self.critical? ]
end

#to_hObject

“value”=>value, “critical”=>true|false



55
56
57
# File 'lib/openssl/x509.rb', line 55

def to_h # {"oid"=>sn|ln, "value"=>value, "critical"=>true|false}
  {"oid"=>self.oid,"value"=>self.value,"critical"=>self.critical?}
end

#to_sObject

“oid = critical, value”



48
49
50
51
52
53
# File 'lib/openssl/x509.rb', line 48

def to_s # "oid = critical, value"
  str = self.oid
  str << " = "
  str << "critical, " if self.critical?
  str << self.value.gsub(/\n/, ", ")
end