Skip to content

Commit

Permalink
#187 fix wrapping with create instead of new
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Oct 31, 2022
1 parent 1ad75dd commit c6ea81b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions R/SWEQuantity.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ SWEQuantity <- R6Class("SWEQuantity",
#'@description setConstraint
#'@param constraint constraint
setConstraint = function(constraint){
self$constraint <- SWEElement$new(element = "constraint", value = constraint)
self$constraint <- SWEElement$create(element = "constraint", value = constraint)
},

#'@description setValue
Expand All @@ -69,7 +69,7 @@ SWEQuantity <- R6Class("SWEQuantity",
if(!is.numeric(value)){
stop("Value should be numeric")
}
self$value <- SWEElement$new(element = "value", value = value)
self$value <- SWEElement$create(element = "value", value = value)
}
)
)
4 changes: 2 additions & 2 deletions R/SWEQuantityRange.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ SWEQuantityRange <- R6Class("SWEQuantityRange",
#'@description setConstraint
#'@param constraint constraint
setConstraint = function(constraint){
self$constraint <- SWEElement$new(element = "constraint", value = constraint)
self$constraint <- SWEElement$create(element = "constraint", value = constraint)
},

#'@description setValue
Expand All @@ -80,7 +80,7 @@ SWEQuantityRange <- R6Class("SWEQuantityRange",
}else{
stop("Value should be either a vector or matrix")
}
self$value <- SWEElement$new(element = "value", value = value)
self$value <- SWEElement$create(element = "value", value = value)
}
)
)
4 changes: 2 additions & 2 deletions R/SWEText.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ SWEText <- R6Class("SWEText",
#'@description setConstraint
#'@param constraint constraint
setConstraint = function(constraint){
self$constraint <- SWEElement$new(element = "constraint", value = constraint)
self$constraint <- SWEElement$create(element = "constraint", value = constraint)
},

#'@description setValue
#'@param value value
setValue = function(value){
self$value <- SWEElement$new(element = "value", value = value)
self$value <- SWEElement$create(element = "value", value = value)
}
)
)
4 changes: 2 additions & 2 deletions R/SWETime.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ SWETime <- R6Class("SWETime",
#'@description setConstraint
#'@param constraint constraint
setConstraint = function(constraint){
self$constraint <- SWEElement$new(element = "constraint", value = constraint)
self$constraint <- SWEElement$create(element = "constraint", value = constraint)
},

#'@description setValue
Expand All @@ -69,7 +69,7 @@ SWETime <- R6Class("SWETime",
if(!is(value,"Date") && !is(value, "POSIXt")){
stop("Value should be either a Date or POSIX object")
}
self$value <- SWEElement$new(element = "value", value = value)
self$value <- SWEElement$create(element = "value", value = value)
}
)
)

0 comments on commit c6ea81b

Please sign in to comment.