Docs for reflection and extensions#379
Docs for reflection and extensions#379jhollinger merged 6 commits intoprocore-oss:mainfrom jhollinger:ref-ext-docs
Conversation
| The following class implements all extension hooks. If you have an idea for a new one, open an issue or PR. | ||
|
|
||
| ```ruby | ||
| class ExampleExtension < Blueprinter::Extension |
There was a problem hiding this comment.
any real-life examples that could help sparkle thought process?
There was a problem hiding this comment.
There was a problem hiding this comment.
Should we add this link to the readme as well for reference?
| def pre_render(object, blueprint, view, options) | ||
| # modify or replace object | ||
| object | ||
| end |
There was a problem hiding this comment.
just thinking if we should move away from the field-level type formatters in favour of extension APIs for future use-cases and provide a set of default extensions OOTB that can be configured?
DateFormatterExtension, CurrencyFormatterExtension comes to mind easily..
There was a problem hiding this comment.
Interesting - a "blueprinter-contrib" kind of thing? I guess we could package up any number of extensions and/or formatters.
Signed-off-by: Jordan Hollinger <jordan.hollinger@gmail.com>
Signed-off-by: Jordan Hollinger <jordan.hollinger@gmail.com> Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
Co-authored-by: Jake Sheehy <jacobjsheehy@gmail.com> Signed-off-by: Jordan Hollinger <jordan.hollinger@gmail.com>
Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
|
Great with reflection docs! I was just trying to find them, and then happily found this PR. Thanks! 😄 |
See the rendered updates at https://github.com/jhollinger/blueprinter/blob/ref-ext-docs/README.md.
Checklist: