class Rex::Proto::Kerberos::CredentialCache::Element
Public Class Methods
attr_accessor(*vars)
click to toggle source
Calls superclass method
# File lib/rex/proto/kerberos/credential_cache/element.rb, line 8 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/credential_cache/element.rb, line 17 def self.attributes @attributes end
new(options = {})
click to toggle source
# File lib/rex/proto/kerberos/credential_cache/element.rb, line 21 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/credential_cache/element.rb, line 33 def attributes self.class.attributes end
encode()
click to toggle source
Encodes the Rex::Proto::Kerberos::CredentialCache::Element
into an String. This method has been designed to be overridden by subclasses.
@raise [NoMethodError]
# File lib/rex/proto/kerberos/credential_cache/element.rb, line 41 def encode raise ::NoMethodError, 'Method designed to be overridden' end