Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decorate Value Objects with Input Type Assertion #12

Open
harell opened this issue Feb 24, 2021 · 0 comments
Open

Decorate Value Objects with Input Type Assertion #12

harell opened this issue Feb 24, 2021 · 0 comments

Comments

@harell
Copy link
Member

harell commented Feb 24, 2021

Use decorators on Value Objects such that:

  • decorators$assert_input_type checks input arg complies with default value type
  • decorators$assert_input_equal_length checks input args are of the same length

See related issue

Cars <- function(model = NA_charater, hp = NA_real_){
 data.frame(model = model, hp = hp)
}

Cars <- decorators$assert_input_type(Cars)
Cars <- decorators$assert_input_equal_length(Cars)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant