-
One of the things that I working on in https://github.com/alisnic/solar-rails is auto-complete story inside # config/routes.rb
Rails.application.routes.draw do
# here all instance methods of ActionDispatch::Routing::Mapper should autocomplete
end How can I achieve that? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Solargraph provides a custom class Example
def something
end
end
# @yieldself [Example]
def run_in_example &block
Example.new.instance_eval &block
end
run_in_example do
something # <- Recognized as Example#something
end The |
Beta Was this translation helpful? Give feedback.
-
Does it work if you save the file and restart the editor? |
Beta Was this translation helpful? Give feedback.
Solargraph provides a custom
@yieldself
tag that lets you specify the context of a yielded block. Example:The
@yieldself
tag should work inside an@!override
as well.