MetasploitDataModels

Provides ActiveRecord 3.1x-friendly serialization for descendants of ActiveRecord::Base. Backwards compatible with older YAML methods and will fall back to string decoding in the worst case

@example Using default default of {}

serialize :foo, MetasploitDataModels::Base64Serializer.new

@example Overriding default to []

serialize :bar, MetasploitDataModels::Base64Serializer.new(:default => [])

Constants

VERSION

MetasploitDataModels follows the {semver.org/ Semantic Versioning Specification}. At this time, the API is considered unstable because although the database migrations have moved from metasploit-framework/data/sql/migrate to db/migrate in this project, not all models have specs that verify the migrations (with have_db_column and have_db_index) and certain models may not be shared between metasploit-framework and pro, so models may be removed in the future. Because of the unstable API the version should remain below 1.0.0

Public Class Methods

app_pathname() click to toggle source
# File lib/metasploit_data_models.rb, line 33
def self.app_pathname
  root.join('app')
end
root() click to toggle source
# File lib/metasploit_data_models.rb, line 37
def self.root
  unless instance_variable_defined? :@root
    lib_pathname = Pathname.new(__FILE__).dirname

    @root = lib_pathname.parent
  end

  @root
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.