Module: Phlexi::Form::Options::Length
- Included in:
- Builder
- Defined in:
- lib/phlexi/form/options/length.rb
Instance Method Summary collapse
Instance Method Details
#maxlength(maxlength = nil) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/phlexi/form/options/length.rb', line 16 def maxlength(maxlength = nil) if maxlength.nil? .fetch(:maxlength) { [:maxlength] = calculate_maxlength } else [:maxlength] = maxlength self end end |
#minlength(minlength = nil) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/phlexi/form/options/length.rb', line 7 def minlength(minlength = nil) if minlength.nil? .fetch(:minlength) { [:minlength] = calculate_minlength } else [:minlength] = minlength self end end |