Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document inline syntax for Ruby 2.1 and newer #12

Open
donv opened this issue Apr 9, 2015 · 0 comments
Open

Document inline syntax for Ruby 2.1 and newer #12

donv opened this issue Apr 9, 2015 · 0 comments

Comments

@donv
Copy link

donv commented Apr 9, 2015

The Readme should document an alternative syntax usable in Ruby 2.1 and newer.

class MyClass
  typesig def by_four(i)
    i * 4
  end , [Integer] => Integer
end

If Rubype would allow trailing method name, it could look like this:

class MyClass
  typesig {[Integer] => Integer},
  def by_four(i)
    i * 4
  end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant