Class: Blueprinter::Extension Private

Inherits:
Object
  • Object
show all
Defined in:
lib/blueprinter/extension.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.

Base class for all extensions. All extension methods are implemented as no-ops.

Instance Method Summary collapse

Instance Method Details

#pre_render(object, _blueprint, _view, _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.

Called eary during “render”, this method receives the object to be rendered and may return a modified (or new) object to be rendered.

Parameters:

  • object (Object)

    The object to be rendered

  • _blueprint (Class)

    The Blueprinter class

  • _view (Symbol)

    The blueprint view

  • _options (Hash)

    Options passed to “render”

Returns:

  • (Object)

    The object to continue rendering



18
19
20
# File 'lib/blueprinter/extension.rb', line 18

def pre_render(object, _blueprint, _view, _options)
  object
end