lib/yard/handlers/ruby/dsl_handler_methods.rb in yard-0.9.20 vs lib/yard/handlers/ruby/dsl_handler_methods.rb in yard-0.9.21
- old
+ new
@@ -38,12 +38,12 @@
# ignore DSL definitions if @method/@attribute directive is used
if @docstring =~ /^@!?(method|attribute)\b/
return register_docstring(nil)
end
- object = MethodObject.new(namespace, method_name, scope)
- object.signature = method_signature
- register(object)
+ register MethodObject.new(namespace, method_name, scope) do |o|
+ o.signature = method_signature
+ end
end
def register_docstring(object, docstring = @docstring, stmt = statement)
super
end