class DTOSchema::Checks::BoundCheck
A validation check with bound key-word arguments.
Public Class Methods
new(check, args)
click to toggle source
# File lib/dto_schema/checks.rb, line 46 def initialize (check, args) @check = check @args = args end
Public Instance Methods
resolve()
click to toggle source
Ensure the underlying check doesn't have dangling references
# File lib/dto_schema/checks.rb, line 58 def resolve @check.resolve end
validate(data, args = {})
click to toggle source
Validate attribute value
# File lib/dto_schema/checks.rb, line 52 def validate (data, args = {}) args = @args.merge(args) @check.validate data, args # pass predefined kw-args end