Skip to content

Commit

Permalink
Add convinent init method
Browse files Browse the repository at this point in the history
  • Loading branch information
lmcmz committed Nov 9, 2021
1 parent d6db283 commit db2adc3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
<a href="">Contribute</a> ·
<a href="">Report a Bug</a>
</p>
</div><br />
</div>
<br/>

## Overview

Expand Down
10 changes: 10 additions & 0 deletions Sources/Flow/Models/FlowArgument.swift
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,11 @@ extension Flow.Argument {
public let name: String
public let value: Flow.Argument

public init(name: String, value: Flow.Cadence.FValue) {
self.name = name
self.value = value.toArgument()
}

public init(name: String, value: Flow.Argument) {
self.name = name
self.value = value
Expand All @@ -303,6 +308,11 @@ extension Flow.Argument {
public let key: Flow.Argument
public let value: Flow.Argument

public init(key: Flow.Cadence.FValue, value: Flow.Cadence.FValue) {
self.key = key.toArgument()
self.value = value.toArgument()
}

public init(key: Flow.Argument, value: Flow.Argument) {
self.key = key
self.value = value
Expand Down

0 comments on commit db2adc3

Please sign in to comment.