Class: Avmtrf1::Esosti::RawDataSanitizer

Inherits:
Object
  • Object
show all
Defined in:
lib/avmtrf1/esosti/raw_data_sanitizer.rb

Constant Summary collapse

CONTENT_KEY =
'content'

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.sanitize(raw_data) ⇒ Object


9
10
11
# File 'lib/avmtrf1/esosti/raw_data_sanitizer.rb', line 9

def sanitize(raw_data)
  new(raw_data).sanitized
end

Instance Method Details

#sanitizedObject


18
19
20
21
22
23
24
25
26
# File 'lib/avmtrf1/esosti/raw_data_sanitizer.rb', line 18

def sanitized
  if raw_data.is_a?(Array)
    array_sanitized
  elsif raw_data.is_a?(Hash)
    hash_sanitized
  else
    raw_data
  end
end