Class: Blueprinter::HashExtractor

Inherits:
Extractor
  • Object
show all
Defined in:
lib/blueprinter/extractors/hash_extractor.rb

Instance Method Summary collapse

Methods inherited from Extractor

extract

Instance Method Details

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



3
4
5
# File 'lib/blueprinter/extractors/hash_extractor.rb', line 3

def extract(field_name, object, local_options, options = {})
  object[field_name] || object[field_name.to_s]
end