Runtime assertions for Ruby literal.fun
ruby
5
fork

Configure Feed

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

Update README.md

authored by

Joel Drapper and committed by
GitHub
225ea2db e738abb4

+5 -1
+5 -1
README.md
··· 224 224 You can also compose these types together to form more complex types. You can also save your own types as constants for re-use. 225 225 226 226 ```ruby 227 - AttributeType = Literal::Types::_Union(String, Symbol, Literal::Types::_Interface(:to_s)) 227 + AttributeType = Literal::Types::_Union( 228 + String, 229 + Symbol, 230 + Literal::Types::_Interface(:to_s) 231 + ) 228 232 ``` 229 233 230 234 Note unless you've extended `Literal::Types`, you'll need to reference the types by their fully qualified names. These types are methods, so why are we accessing them with `::`? It's a little known fact that `::` can stand in for `.` in Ruby. I like using `::` here becuase it makes these look more like normal generics. If you prefer, you can use `.`, e.g. `Literal::Types._Interface(:to_s)`.