Sha256: 004e04087df941dadd745feb14c666635e772f0e49ea211168fbb149ba9e57cb
Contents?: true
Size: 523 Bytes
Versions: 7
Compression:
Stored size: 523 Bytes
Contents
module MetasploitDataModels::SerializedPrefs def serialized_prefs_attr_accessor(*args) args.each do |method_name| method_declarations = <<-RUBY def #{method_name} return if not self.prefs self.prefs[:#{method_name}] end def #{method_name}=(value) temp = self.prefs || {} temp[:#{method_name}] = value self.prefs = temp end RUBY class_eval method_declarations, __FILE__, __LINE__ end end end
Version data entries
7 entries across 7 versions & 1 rubygems