module Metasploit::Model::NilifyBlanks::ClassMethods
Adds DSL methods once NilifyBlanks is included so that attributes where blanks should be changed to `nil` can be declared.
Public Instance Methods
nilify_blank(*attributes)
click to toggle source
Declares that `attributes` should be changed to `nil` before validation if they are blank.
@param attributes [Enumerable<Symbol>] one or more attribute names @return [void]
# File lib/metasploit/model/nilify_blanks.rb, line 20 def nilify_blank(*attributes) nilify_blank_attribute_set.merge(attributes) end
nilify_blank_attribute_set()
click to toggle source
Set of all attributes registered with {#nilify_blank}.
@return [Set<Symbol>]
# File lib/metasploit/model/nilify_blanks.rb, line 27 def nilify_blank_attribute_set @nilify_blank_attribute_set ||= Set.new end