Skip to content

@!attribute documentation not working as expected #1126

@MaxPleaner

Description

@MaxPleaner

Given a class like this:

class TwitterWrapper
  # @!attribute [r] client
  #   @return [Twitter::REST::Client]
  attr_reader :client
end

and I use YARD 0.9.9 to generate docs, I see the wrong return type:

pic

Yet when I use just @return:

class TwitterWrapper
  # @return [Twitter::REST::Client]
  attr_reader :client
end

it works fine:

pic2

I also tried @attr [Twitter::REST::Client] but it still showed Object.

I am using Bash on Ubuntu on Windows 10. Ruby version 2.4.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions