Module: MetasploitDataModels

Defined in:
lib/metasploit_data_models/base64_serializer.rb,
lib/metasploit_data_models.rb,
lib/metasploit_data_models/engine.rb,
lib/metasploit_data_models/search.rb,
lib/metasploit_data_models/version.rb,
lib/metasploit_data_models/search/visitor.rb,
lib/metasploit_data_models/serialized_prefs.rb,
lib/metasploit_data_models/change_required_columns_to_null_false.rb

Overview

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

Examples:

Using default default of {}

serialize :foo, MetasploitDataModels::Base64Serializer.new

Overriding default to []

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

Defined Under Namespace

Modules: IPAddress, Search, SerializedPrefs, Version Classes: Base64Serializer, ChangeRequiredColumnsToNullFalse, Engine

Constant Summary collapse

GEM_VERSION =

See Also:

Version.gem
VERSION =
Version.full

Class Method Summary collapse

Class Method Details

.rootObject



36
37
38
39
40
41
42
43
44
# File 'lib/metasploit_data_models.rb', line 36

def self.root
  unless instance_variable_defined? :@root
    lib_pathname = Pathname.new(__FILE__).dirname

    @root = lib_pathname.parent
  end

  @root
end