Add jruby helper library example (#2258)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>pull/2259/head
parent
3de78d17f9
commit
17df2612c7
|
@ -185,6 +185,15 @@ s_rule.set_triggers([
|
||||||
])
|
])
|
||||||
|
|
||||||
$automationManager.add_rule(s_rule)
|
$automationManager.add_rule(s_rule)
|
||||||
|
|
||||||
|
# And the same rule using the bundled helper library:
|
||||||
|
|
||||||
|
rule "A Cron Rule in Ruby" do
|
||||||
|
every :minute
|
||||||
|
run do
|
||||||
|
logger.info "Hello World from JRuby"
|
||||||
|
end
|
||||||
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
@ -233,7 +242,7 @@ The `default` preset is preloaded, so it does not require importing.
|
||||||
#### Default Preset (`importPreset` not required)
|
#### Default Preset (`importPreset` not required)
|
||||||
|
|
||||||
| Variable | Description |
|
| Variable | Description |
|
||||||
|-------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `State` | `org.openhab.core.types.State` |
|
| `State` | `org.openhab.core.types.State` |
|
||||||
| `Command` | `org.openhab.core.types.Command` |
|
| `Command` | `org.openhab.core.types.Command` |
|
||||||
| `URLEncoder` | `java.net.URLEncoder` |
|
| `URLEncoder` | `java.net.URLEncoder` |
|
||||||
|
|
Loading…
Reference in New Issue