Method: Blueprinter::AutoExtractor#extract

Defined in:
lib/blueprinter/extractors/auto_extractor.rb

#extract(field_name, object, local_options, options = {}) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



13
14
15
16
17
# File 'lib/blueprinter/extractors/auto_extractor.rb', line 13

def extract(field_name, object, local_options, options = {})
  extraction = extractor(object, options).extract(field_name, object, local_options, options)
  value = @datetime_formatter.format(extraction, options)
  use_default_value?(value, options[:default_if]) ? default_value(options) : value
end