Class: Blueprinter::Transformer Private

Inherits:
Object
  • Object
show all
Defined in:
lib/blueprinter/transformer.rb

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.transform(result_hash, primary_obj, 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.



10
11
12
# File 'lib/blueprinter/transformer.rb', line 10

def self.transform(result_hash, primary_obj, options = {})
  new.transform(result_hash, primary_obj, options)
end

Instance Method Details

#transform(_result_hash, _primary_obj, _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.

Raises:

  • (NotImplementedError)


6
7
8
# File 'lib/blueprinter/transformer.rb', line 6

def transform(_result_hash, _primary_obj, _options = {})
  raise NotImplementedError, 'A Transformer must implement #transform'
end