Module: Scrubba::ActiveMethods

Defined in:
lib/scrubba/active_methods.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



3
4
5
# File 'lib/scrubba/active_methods.rb', line 3

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

#scrubba_apply(keys, func) ⇒ Object



7
8
9
10
11
# File 'lib/scrubba/active_methods.rb', line 7

def scrubba_apply(keys, func)
  keys.each do |k|
    self[k] = Scrubba.public_send(func, self[k]) if self[k].present?
  end
end