lib/yard/handlers/ruby/base.rb in yard-0.7.5 vs lib/yard/handlers/ruby/base.rb in yard-0.8.0
- old
+ new
@@ -133,24 +133,28 @@
push_state(opts) do
nodes = inner_node.type == :list ? inner_node.children : [inner_node]
parser.process(nodes)
end
end
-
+
# @group Macro Handling
def call_params
return [] unless statement.respond_to?(:parameters)
- statement.parameters(false).map do |param|
- param.jump(:ident, :tstring_content).source
- end
+ statement.parameters(false).compact.map do |param|
+ if param.type == :list
+ param.map {|n| n.jump(:ident, :kw, :tstring_content).source }
+ else
+ param.jump(:ident, :kw, :tstring_content).source
+ end
+ end.flatten
end
def caller_method
- if statement.call?
+ if statement.call? || statement.def?
statement.method_name(true).to_s
elsif statement.type == :var_ref || statement.type == :vcall
- statement[0].jump(:ident).source
+ statement[0].jump(:ident, :kw).source
else
nil
end
end
end
\ No newline at end of file