A fast static callable method checker for Ruby code.
No type annotations required, just check callable methods in your Ruby files.
Method-Ray supports Ruby 3.4 or later.
gem install methodray- Install the Method-Ray VSCode extension
- Open a Ruby file in VSCode
- Errors will be highlighted automatically
# Check a single file
bundle exec methodray check app/models/user.rb
# Watch mode - auto re-check on file changes
bundle exec methodray watch app/models/user.rbmethodray check <file>: Performs static type checking on the specified Ruby file.
class User
def greeting
name = "Alice"
message = name.abs
message
end
endThis will output:
$ bundle exec methodray check app/models/user.rb
app/models/user.rb:4:15: error: undefined method `abs` for String
message = name.abs
^
Bug reports and pull requests are welcome on GitHub at this repository!
MIT License. See LICENSE file for details.