Class: Wpxf::Models::Module

Inherits:
Sequel::Model
  • Object
show all
Defined in:
lib/wpxf/models/module.rb

Overview

A cache of a Wpxf::Module's metadata.

Instance Method Summary collapse

Instance Method Details

#validateObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/wpxf/models/module.rb', line 9

def validate
  super

  validates_presence :path
  validates_presence :name
  validates_presence :type
  validates_presence :class_name

  validates_type String, :path
  validates_type String, :name
  validates_type String, :class_name

  validates_unique :path
  validates_unique :class_name

  validates_max_length 255, :path
  validates_max_length 255, :name
  validates_max_length 255, :class_name

  validates_format /^auxiliary|exploit$/, :type
end