Runtime assertions for Ruby literal.fun
ruby
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

Make `_Not` accept multiple parameters

Closes #295

+13 -5
+13 -5
lib/literal/types.rb
··· 309 309 end 310 310 311 311 # Matches if the given type is *not* matched. 312 - def _Not(type) 313 - case type 314 - when NotType 315 - type.type 312 + def _Not(*types) 313 + if types.length > 1 314 + NotType.new( 315 + _Union(*types) 316 + ) 316 317 else 317 - NotType.new(type) 318 + type = types[0] 319 + 320 + case type 321 + when NotType 322 + type.type 323 + else 324 + NotType.new(type) 325 + end 318 326 end 319 327 end 320 328