Class: Bsm::Constrainable::Field::String

Inherits:
Base
  • Object
show all
Defined in:
lib/bsm/constrainable/field/common.rb

Constant Summary

Constants inherited from Base

Base::DEFAULT_OPERATORS

Instance Attribute Summary

Attributes inherited from Base

#attribute, #name, #operators, #options, #scope

Instance Method Summary collapse

Methods inherited from Base

#convert, #initialize, kind, #merge

Constructor Details

This class inherits a constructor from Bsm::Constrainable::Field::Base

Instance Method Details

#_convert(v) ⇒ Object



27
28
29
30
# File 'lib/bsm/constrainable/field/common.rb', line 27

def _convert(v)
  result = super
  result.blank? && !options[:allow_blank] ? nil : result
end