Class: Saml::Kit::Cli::CertificateReport
- Inherits:
-
Object
- Object
- Saml::Kit::Cli::CertificateReport
- Defined in:
- lib/saml/kit/cli/certificate_report.rb
Constant Summary collapse
- HEADER =
[ 'Subject', 'Issuer', 'Serial', 'Not Before', 'Not After', 'Fingerprint' ].freeze
Instance Attribute Summary collapse
-
#certificate ⇒ Object
readonly
Returns the value of attribute certificate.
-
#x509 ⇒ Object
readonly
Returns the value of attribute x509.
Instance Method Summary collapse
-
#initialize(raw) ⇒ CertificateReport
constructor
A new instance of CertificateReport.
- #print(shell) ⇒ Object
Constructor Details
#initialize(raw) ⇒ CertificateReport
Returns a new instance of CertificateReport.
13 14 15 16 |
# File 'lib/saml/kit/cli/certificate_report.rb', line 13 def initialize(raw) @certificate = ::Xml::Kit::Certificate.new(raw, use: :unknown) @x509 = @certificate.x509 end |
Instance Attribute Details
#certificate ⇒ Object (readonly)
Returns the value of attribute certificate.
11 12 13 |
# File 'lib/saml/kit/cli/certificate_report.rb', line 11 def certificate @certificate end |
#x509 ⇒ Object (readonly)
Returns the value of attribute x509.
11 12 13 |
# File 'lib/saml/kit/cli/certificate_report.rb', line 11 def x509 @x509 end |
Instance Method Details
#print(shell) ⇒ Object
18 19 20 21 |
# File 'lib/saml/kit/cli/certificate_report.rb', line 18 def print(shell) shell.print_table([HEADER, body]) shell.say(x509.to_text, :green) end |