Module: Scratch::Concerns::Stripify::ClassMethods
- Defined in:
- lib/scratch/concerns/stripify.rb
Instance Method Summary collapse
Instance Method Details
#stripify(options = {}) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/scratch/concerns/stripify.rb', line 7 def stripify( = {}) = HashWithIndifferentAccess.new [:before] ||= :validation [:name] ||= "stripify_before_#{[:before]}" instance_eval do normalize .merge(method: :strip) end end |