Skip to content

Latest commit

 

History

History
56 lines (38 loc) · 964 Bytes

File metadata and controls

56 lines (38 loc) · 964 Bytes

Method-Ray

A fast static callable method checker for Ruby code.

No type annotations required, just check callable methods in your Ruby files.

Requirements

Method-Ray supports Ruby 3.4 or later.

Installation

gem install method-ray

Quick Start

Checking Methods

# Check a single file
bundle exec methodray check app/models/user.rb

Example Usage

bundle exec methodray check app/models/user.rb

# app/models/user.rb
class User
  def greeting
    name = "Alice"
    message = name.abs
    message
  end
end

This will output:

$ bundle exec methodray check app/models/user.rb
app/models/user.rb:4:19: error: undefined method `abs` for String
       message = name.abs
                     ^

Contributing

Bug reports and pull requests are welcome on GitHub at this repository!

License

MIT License. See LICENSE file for details.