Module: QuoVadis::IpMasking
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
8 9 10 11 |
# File 'lib/quo_vadis/ip_masking.rb', line 8 def self.included(base) base.extend ClassMethods base.before_validation :mask_ip, if: -> { QuoVadis.mask_ips } end |
Instance Method Details
#mask_ip ⇒ Object
13 14 15 |
# File 'lib/quo_vadis/ip_masking.rb', line 13 def mask_ip self.ip = self.class.mask_ip ip end |