Skip to content

Decorate Value Objects with Input Type Assertion #12

Description

@harell

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions