class Rex::Proto::Kerberos::Pac::Element

Public Class Methods

attr_accessor(*vars) click to toggle source
Calls superclass method
# File lib/rex/proto/kerberos/pac/element.rb, line 11
def self.attr_accessor(*vars)
  @attributes ||= []
  @attributes.concat vars
  super(*vars)
end
attributes() click to toggle source

Retrieves the element class fields

@return [Array]

# File lib/rex/proto/kerberos/pac/element.rb, line 20
def self.attributes
  @attributes
end
new(options = {}) click to toggle source
# File lib/rex/proto/kerberos/pac/element.rb, line 24
def initialize(options = {})
  self.class.attributes.each do |attr|
    if options.has_key?(attr)
      m = (attr.to_s + '=').to_sym
      self.send(m, options[attr])
    end
  end
end

Public Instance Methods

attributes() click to toggle source

Retrieves the element instance fields

@return [Array]

# File lib/rex/proto/kerberos/pac/element.rb, line 36
def attributes
  self.class.attributes
end
encode() click to toggle source

Encodes the Rex::Proto::Kerberos::Pac::Element into an String. This method has been designed to be overridden by subclasses.

@raise [NoMethodError]

# File lib/rex/proto/kerberos/pac/element.rb, line 44
def encode
  raise ::NoMethodError, 'Method designed to be overridden'
end