Schema-based validation and coercion for Ruby data structures