Module: Metasploit::Model::NilifyBlanks::ClassMethods
- Defined in:
- lib/metasploit/model/nilify_blanks.rb
Overview
Adds DSL methods once NilifyBlanks is included so that attributes where blanks should be changed to nil can be
declared.
Instance Method Summary collapse
- 
  
    
      #nilify_blank(*attributes)  ⇒ void 
    
    
  
  
  
  
  
  
  
  
  
    Declares that attributesshould be changed tonilbefore validation if they are blank.
- 
  
    
      #nilify_blank_attribute_set  ⇒ Set<Symbol> 
    
    
  
  
  
  
  
  
  
  
  
    Set of all attributes registered with #nilify_blank. 
Instance Method Details
#nilify_blank(*attributes) ⇒ void
This method returns an undefined value.
Declares that attributes should be changed to nil before validation if they are blank.
| 22 23 24 | # File 'lib/metasploit/model/nilify_blanks.rb', line 22 def nilify_blank(*attributes) nilify_blank_attribute_set.merge(attributes) end | 
#nilify_blank_attribute_set ⇒ Set<Symbol>
Set of all attributes registered with #nilify_blank.
| 29 30 31 | # File 'lib/metasploit/model/nilify_blanks.rb', line 29 def nilify_blank_attribute_set @nilify_blank_attribute_set ||= Set.new end |