Reputation: 4535
I have a method like this
def self.import(file_name, opts = {})
which I'm trying to document with YARD. However this is a method which is 100% side effect (I know, I know, side effects, urgh!). But for users of this method there is effectively no returned object of any type, however YARD generates a signature like this:
+ (Object) import(file_name, opts = {})
Is there any way to tell yard that the import method returns nothing?
I can tell it to return nil, but that's not really the same thing
Upvotes: 12
Views: 3379
Reputation: 1042
All methods return something, the void key word might be what you are looking for.
# @return [void]
def method_returning_unknown_object
end
Upvotes: 13