Skip to content

Commit 4eb3c77

Browse files
Create IsNumberMethod.cs
1 parent bcefe8a commit 4eb3c77

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)