Class: YARD::Parser::Rustdoc::Statements::Method
- Defined in:
- lib/yard-rustdoc/statements.rb
Instance Method Summary collapse
- #name ⇒ Object
-
#parameters ⇒ Object
Parses the parameters from the @def annotations in the docstring.
- #scope ⇒ Object
Methods inherited from Base
#comments_hash_flag, #comments_range, #docstring, #file, #initialize, #line, #line_range, #show, #source
Constructor Details
This class inherits a constructor from YARD::Parser::Rustdoc::Statements::Base
Instance Method Details
#name ⇒ Object
98 99 100 101 102 |
# File 'lib/yard-rustdoc/statements.rb', line 98 def name parse_def! @name || @rustdoc.fetch("name") end |
#parameters ⇒ Object
Parses the parameters from the @def annotations in the docstring
114 115 116 117 118 |
# File 'lib/yard-rustdoc/statements.rb', line 114 def parameters parse_def! @parameters end |
#scope ⇒ Object
104 105 106 107 108 109 110 111 |
# File 'lib/yard-rustdoc/statements.rb', line 104 def scope first_arg = @rustdoc.dig("inner", "decl", "inputs", 0, 0) if first_arg == "self" || first_arg == "rb_self" :instance else :class end end |