class LHC::BodyScrubber
def initialize(data)
def initialize(data) super(data) parse! scrub! end
def parse!
def parse! return if scrubbed.nil? || scrubbed.is_a?(Hash) || scrubbed.is_a?(Array) if scrubbed.is_a?(String) json = scrubbed else json = scrubbed.to_json end parsed = JSON.parse(json) self.scrubbed = parsed if parsed.is_a?(Hash) || parsed.is_a?(Array) end
def scrub_elements
def scrub_elements LHC.config.scrubs[:body] end