Skip to content

Commit ae48592

Browse files
committed
Fix readme for delegate option
1 parent 349d82d commit ae48592

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ gem install roda-phlex
4343
* `:delegate`: Define if or which methods should be delegated to the Roda app:
4444
+ `true` (default): Create a single `app` method that delegates to the Roda app.
4545
+ `false`: Do not create any delegate methods.
46-
+ `Array<Symbol,String>`: Delegate only the specified methods to the Roda app.
47-
* `:delegate_on`: The object to delegate methods to. Defaults to `::Phlex::SGML`.
48-
It is advised to set it to your own subclass of `::Phlex::SGML`, like `ApplicationView`.
46+
+ `Array<Symbol,String>`: Delegate the named methods to the Roda app.
47+
* `:delegate_on`: Class or module to define delegation methods on. Defaults to `::Phlex::SGML`.
48+
+ Use this option to limit delegation methods to a application specific class or module
49+
(like "ApplicationView") to avoid polluting the global namespace.
50+
* `:delegate_name`: The name of the method that delegates to the Roda app. Defaults to `"app"`.
4951

5052
## Usage
5153

0 commit comments

Comments
 (0)