Sha256: c9981fbfec3b3ac12b6a004ac3720f11c12e286442cba45570b70354f0255863
Contents?: true
Size: 1.18 KB
Versions: 7
Compression:
Stored size: 1.18 KB
Contents
# -*- coding: binary -*- module Rex module Proto module Kerberos module CredentialCache class Element def self.attr_accessor(*vars) @attributes ||= [] @attributes.concat vars super(*vars) end # Retrieves the element class fields # # @return [Array] def self.attributes @attributes end 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 # Retrieves the element instance fields # # @return [Array] def attributes self.class.attributes end # Encodes the Rex::Proto::Kerberos::CredentialCache::Element into an String. This # method has been designed to be overridden by subclasses. # # @raise [NoMethodError] def encode raise ::NoMethodError, 'Method designed to be overridden' end end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems