Sha256: b8df81b199602be39d80fda6a2cffe63e0f79834d087d6345b97538d07e717c3
Contents?: true
Size: 568 Bytes
Versions: 41
Compression:
Stored size: 568 Bytes
Contents
module MetasploitDataModels module Validators # Mimics behavior of `app/validators` in Rails projects by adding it to # `ActiveSupport::Dependencies.autoload_paths` if it is not already in the Array. # # @return [void] def autoload_validators validators_path = validators_pathname.to_s unless ActiveSupport::Dependencies.autoload_paths.include? validators_path ActiveSupport::Dependencies.autoload_paths << validators_path end end def validators_pathname app_pathname.join('validators') end end end
Version data entries
41 entries across 41 versions & 1 rubygems