Replies: 1 comment
-
If you want it to be truly global, you could define it with a module Kernel
# @!method user
# @return [User]
end
user # recognized here
class Example
user # and here
def foo
user # and here
end
def self.bar
user # and here
end
end |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it possible to set globally variable type by name?
For example, set that the
user
variable is always an instance of theUser
class?Beta Was this translation helpful? Give feedback.
All reactions