Skip to content

Commit

Permalink
adding the outer constructor back
Browse files Browse the repository at this point in the history
  • Loading branch information
tengis-nrl committed Mar 26, 2024
1 parent a5942d8 commit 45a4c4f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/system_descriptor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,24 @@ struct SystemArgument
default::Any
allowed_values::Set{<:Any}

function SystemArgument(; name, default, allowed_values)
function SystemArgument(name, default, allowed_values)
isempty(allowed_values) && error("allowed_values cannot be empty")
new(name, default, allowed_values)
end
end

function SystemArgument(;
name,
default,
allowed_values
)
return SystemArgument(
name,
default,
allowed_values
)
end

get_name(arg::SystemArgument) = arg.name
get_default(arg::SystemArgument) = arg.default
get_allowed_values(arg::SystemArgument) = arg.allowed_values
Expand Down

0 comments on commit 45a4c4f

Please sign in to comment.