aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2020-04-12 17:35:58 +0000
committers-ol <s-ol@users.noreply.github.com>2020-04-12 17:35:58 +0000
commitd7de122623bd189e99a13869053eddf1608f57ad (patch)
treea7ccb5dbdb521bd4031e6e1881cdde0c147aef4b
parentlib/time, lib/util: doc updates (diff)
downloadalive-d7de122623bd189e99a13869053eddf1608f57ad.tar.gz
alive-d7de122623bd189e99a13869053eddf1608f57ad.zip
add :metatype() fwd to Input
-rw-r--r--core/base/input.moon3
-rw-r--r--spec/core/input_spec.moon3
2 files changed, 6 insertions, 0 deletions
diff --git a/core/base/input.moon b/core/base/input.moon
index 6922a4f..bcf188e 100644
--- a/core/base/input.moon
+++ b/core/base/input.moon
@@ -72,6 +72,9 @@ class Input
--- return the type name of this `Input` (optional).
type: => @stream.type
+ --- return the metatype name of this `Input` (optional).
+ metatype: => @stream.metatype
+
--- the current value
--
-- @tfield ValueStream stream
diff --git a/spec/core/input_spec.moon b/spec/core/input_spec.moon
index 4b470db..e867408 100644
--- a/spec/core/input_spec.moon
+++ b/spec/core/input_spec.moon
@@ -22,6 +22,9 @@ basic_tests = (stream, input) ->
it 'gives access to the type string', ->
assert.is.equal stream.type, input\type!
+ it 'gives access to the metatype string', ->
+ assert.is.equal stream.metatype, input\metatype!
+
describe 'Input.cold', ->
stream = ValueStream.num 1
input = Input.cold stream