-
-
Notifications
You must be signed in to change notification settings - Fork 416
Closed
Description
Docs here states that this should mark method1 & method2 as class methods:
# @!scope class
# Documentation for method1
def method1; end
# Documentation for method2
def method2; endIn my experience, this doesn't work and @!scope class must be repeated on all methods definitions
Steps to reproduce
Repro:
class Test
def test_instance; end
# @!scope class
# method1 doc
def method1; end
# method2 doc
def method2; end
end
class Test2
def test_instance; end
# @!scope class
def method1; end
def method2; end
end
class Test3
def test_instance; end
# method1 doc
# @!scope class
def method1; end
# method2 doc
# @!scope class
def method2; end
endActual Output
Expected Output
I would expect Test & Test2 to behave the same, with Test2 methods having no doc.
I would expect Test & Test2 to have method1 & method2 as class methods.
I would expect Test & Test3 to have the same doc.
Environment details:
- OS: Fedora 34
- Ruby version (
ruby -v): ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux] - YARD version (
yard -v): yard 0.9.26
I have read the Contributing Guide.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels


