Skip to content

Commit d465fc2

Browse files
committed
added decimal support
1 parent 47e8125 commit d465fc2

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

Docs/Get-Cube.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ SE-UP example commandlet
1313
## SYNTAX
1414

1515
```
16-
Get-Cube [-Number] <Int32[]> [<CommonParameters>]
16+
Get-Cube [-Number] <Decimal[]> [<CommonParameters>]
1717
```
1818

1919
## DESCRIPTION
@@ -41,7 +41,7 @@ Returns cubes of numbers passed via pipeline
4141
Input number(s)
4242

4343
```yaml
44-
Type: Int32[]
44+
Type: Decimal[]
4545
Parameter Sets: (All)
4646
Aliases:
4747

Public/Get-Cube.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ function Get-Cube {
22

33
param (
44
[Parameter(Mandatory=$true,ValueFromPipeline=$true)]
5-
[int[]]$Number
5+
[decimal[]]$Number
66
)
77

88
BEGIN {

Tests/Get-Cube.Tests.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,8 @@ Describe "Proper $CommandName Functionality" {
4747
3,4 | Get-Cube | Should -Be @(27,64)
4848
}
4949

50+
It 'Accepts decimal numbers' {
51+
Get-Cube 2.5 | Should -Be 15.625
52+
}
53+
5054
}

en-US/SE.IntroModule-help.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
<maml:Description>
2121
<maml:para>Input number(s)</maml:para>
2222
</maml:Description>
23-
<command:parameterValue required="true" variableLength="false">Int32[]</command:parameterValue>
23+
<command:parameterValue required="true" variableLength="false">Decimal[]</command:parameterValue>
2424
<dev:type>
25-
<maml:name>Int32[]</maml:name>
25+
<maml:name>Decimal[]</maml:name>
2626
<maml:uri />
2727
</dev:type>
2828
<dev:defaultValue>None</dev:defaultValue>
@@ -35,9 +35,9 @@
3535
<maml:Description>
3636
<maml:para>Input number(s)</maml:para>
3737
</maml:Description>
38-
<command:parameterValue required="true" variableLength="false">Int32[]</command:parameterValue>
38+
<command:parameterValue required="true" variableLength="false">Decimal[]</command:parameterValue>
3939
<dev:type>
40-
<maml:name>Int32[]</maml:name>
40+
<maml:name>Decimal[]</maml:name>
4141
<maml:uri />
4242
</dev:type>
4343
<dev:defaultValue>None</dev:defaultValue>

0 commit comments

Comments
 (0)