We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bcefe8a commit 4eb3c77Copy full SHA for 4eb3c77
MethodSystem/Methods/NumberMethods/IsNumberMethod.cs
@@ -0,0 +1,21 @@
1
+using SER.ArgumentSystem.Arguments;
2
+using SER.ArgumentSystem.BaseArguments;
3
+using SER.MethodSystem.BaseMethods;
4
+using SER.ValueSystem;
5
+
6
+namespace SER.MethodSystem.Methods.NumberMethods;
7
8
+public class IsNumberMethod : ReturningMethod<BoolValue>
9
+{
10
+ public override string Description => "Returns true if the provided value is a number.";
11
12
+ public override Argument[] ExpectedArguments =>
13
+ [
14
+ new AnyValueArgument("value to check")
15
+ ];
16
17
+ public override void Execute()
18
+ {
19
+ ReturnValue = Args.GetAnyValue("value to check") is NumberValue;
20
+ }
21
+}
0 commit comments