Class: Blueprinter::Transformer Private

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

Overview

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.

API:

  • private

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.

API:

  • private



8
9
10
# File 'lib/blueprinter/transformer.rb', line 8

def self.transform(result_hash, primary_obj, options = {})
  self.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.

API:

  • private



4
5
6
# File 'lib/blueprinter/transformer.rb', line 4

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