Skip to content

Commit

Permalink
docs: fix spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
averissimo committed Nov 19, 2024
1 parent 5b402e2 commit ffe1a19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vignettes/decorate-module-output.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ In programming, **decoration** refers to the process of modifying an object whil

In the context of `teal` applications, decoration is specifically used to modify module outputs, such as plots or tables. For example, consider a decorator function `add_title(x, <plot_title>)` that takes a `ggplot2` plot object (`x`) as input, applies a title modification, and returns a modified `ggplot2` plot object. This function qualifies as a decorator because it preserves the original class of the input object. Conversely, a function like `create_plot(<data>, <x_axis>, <y_axis>)`, which generates a new plot object, is **not** a decorator, as it produces an output of a different class.

Preserving the object's class during decoration is essential for compatibility. It ensures that the subsequent "display" logic can seamlessly handle both decorated and undecorated objects.
Preserving the object's class during decoration is essential for compatibility. It ensures that the subsequent "display" logic can seamlessly handle both decorated and non-decorated objects.

The decoration process can vary in complexity:
- **Simple Decorations**: Single-step modifications, such as a single method call that does not require additional data.
Expand Down

0 comments on commit ffe1a19

Please sign in to comment.