Ruby TypeProf Playground
Analyze
Report bug
Ruby
def hello_message(user) "The name is " + user.name end def type_error_demo(user) "The age is " + user.age end user = User.new(name: "John", age: 20) hello_message(user) type_error_demo(user)
RBS
class User def initialize: (name: String, age: Integer) -> void attr_reader name: String attr_reader age: Integer end
Output
GitHub:
ruby/typeprof
(Author:
Yusuke Endoh
) (Frontend author:
koba789
)