aboutsummaryrefslogtreecommitdiffstats
path: root/lib/debug.moon
diff options
context:
space:
mode:
Diffstat (limited to 'lib/debug.moon')
-rw-r--r--lib/debug.moon9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/debug.moon b/lib/debug.moon
index f642c2e..08a7f78 100644
--- a/lib/debug.moon
+++ b/lib/debug.moon
@@ -3,10 +3,13 @@ import Op from require 'core'
class out extends Op
@doc: "(out name-str value) - log value to the console"
- setup: (@name, @value) =>
+ setup: (params) =>
+ super params
+ assert @inputs[2], "need a value"
+ @assert_types 'str', @inputs[2].type
- update: (dt) =>
- L\print "#{@name\unwrap 'str'}", @value\unwrap!
+ tick: =>
+ L\print @unwrap_inputs!
{
:out