Class: R509::ASN1::UserNotice

Inherits:
Object
  • Object
show all
Defined in:
lib/r509/asn1.rb

Overview

UserNotice ::= SEQUENCE {

noticeRef        NoticeReference OPTIONAL,
explicitText     DisplayText OPTIONAL }

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (UserNotice) initialize(data)

A new instance of UserNotice



340
341
342
343
344
345
346
347
348
349
350
# File 'lib/r509/asn1.rb', line 340

def initialize(data)
  data.each do |qualifier|
    #if we find another sequence, that's a noticeReference, otherwise it's explicitText
    if qualifier.kind_of?(OpenSSL::ASN1::Sequence)
      @notice_reference = NoticeReference.new(qualifier)
    else
      @explicit_text = qualifier.value
    end

  end if data.respond_to?(:each)
end

Instance Attribute Details

- (Object) explicit_text (readonly)

Returns the value of attribute explicit_text



339
340
341
# File 'lib/r509/asn1.rb', line 339

def explicit_text
  @explicit_text
end

- (Object) notice_reference (readonly)

Returns the value of attribute notice_reference



339
340
341
# File 'lib/r509/asn1.rb', line 339

def notice_reference
  @notice_reference
end