ruby
March 10, 2016 ยท View on GitHub
- full support
- generator api translator tests
- target version: Ruby 2+
Ruby equivalents used for pseudo types and concepts:
| Pseudo | Ruby |
|---|---|
| List[T] | Array |
| Dictionary[K, V] | Hash |
| Set[T] | Set |
| Tuple[T1, T2..] | Array |
| Array | Array |
| Int | Int |
| Float | Float |
| String | String, Symbol |
| for-loops | .each, .each_with_index |
| classes | classes |
| methods | methods |
| functions | methods in global scope |
niceties
-
Converting class attributes to
attr_accessor/attr_reader/attr_writerafter analyzing their usage withAttrAccessAnalyzeMiddleware -
Expressing array literals with ruby-specific magnificient
%w/%qetc syntax based on their element types :
%w(ha oh well)
%q(look at me fancy)