by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 28 2018 22:29
    lsegal commented #1169
  • May 28 2018 22:28

    lsegal on master

    Support i18n in tag text Merge pull request #1169 from k… (compare)

  • May 28 2018 22:28
    lsegal closed #1169
  • May 27 2018 23:24
  • May 26 2018 07:00
    coveralls commented #1169
  • May 26 2018 06:57
    kou edited #1169
  • May 26 2018 06:57
    kou edited #1169
  • May 26 2018 06:57
    kou edited #1169
  • May 26 2018 06:57
    kou edited #1169
  • May 26 2018 06:57
    kou opened #1169
  • May 23 2018 15:42
  • May 22 2018 20:01
    unit432 starred lsegal/yard
  • May 22 2018 12:07
    MarioRuiz commented #1159
  • May 22 2018 07:30
    angelfan starred lsegal/yard
  • May 21 2018 23:10
    vnbrs starred lsegal/yard
  • May 21 2018 01:47
    dlmccoy edited #1167
  • May 20 2018 09:51
    cboos commented #1168
  • May 19 2018 21:00
    cboos edited #1168
  • May 19 2018 20:59
    cboos edited #1168
  • May 19 2018 20:59
    cboos edited #1168
Marc Siegel
@ms-ati
@lsegal ^^^ I'd like to figure out the maximum that we can do in Values gem to make it convenient for the user. For example, so that in IntelliJ, it knows what the paramaters and properties are. Does that question make sense?
Loren Segal
@lsegal
@ms-ati YARD doesn't do any runtime analysis, and it would be near impossible for an IDE like IntelliJ to deterministically detect any of the above with or without YARD (specifically because IntelliJ could never guarantee that Value.new is your library's Value class. That said, you can write a YARD plugin to generate whatever information you want in the registry, effectively treating it like a struct in the same way YARD does it: https://github.com/lsegal/yard/blob/master/lib/yard/handlers/ruby/class_handler.rb#L72 just don't expect any IDE integration even with that logic.
Marc Siegel
@ms-ati
@lsegal IntelliJ/Rubymine extract type information from YARD tags (https://www.jetbrains.com/ruby/help/using-annotations.html#d903984e128). I had assumed, perhaps incorrectly, that they integrated with YARD to do this. But I realize now that they probably have their own parser for this.
Loren Segal
@lsegal
@ms-ati right, but even their parser would at best only be able to guess that "Value.new" is a special thing. It's extremely difficult to determine that, and given the ambiguity of a name like Value, it would false positive quite a bit.
hjkatz
@hjkatz
Hey there I had a quick question about custom tags, anyone have a second?
MSP-Greg
@MSP-Greg
This message was deleted

I'm creating an instance of a DSL class, then adding a singleton method to it.

dsl_instance = DSLClass.new
def dsl_instance.a_callback_method
# code
end

Yard throws warnings. Anyway to doc the method? Thanks.

Biswajit Das
@dasbiswajit
Hi Team,
I am very new to usage of Yard.
  1. I want to create a yard server on apache
  2. The yard server will generate automatically documentation from Github projects and specific branch on push event? Any ideas?
MSP-Greg
@MSP-Greg
When viewing YARD with YARD, the handler classes show the 'process' statements as methods. Sorry for the dumb question, but how is this done?
Also, I've created a replacement template system for YARD, still working on it. Example is at http://msp-greg.github.io/
Eugen Mayer
@EugenMayer
hello, is there any way to type variables is block, e.g. when i iterate over an array of objects of type X ?
The link is to rubydoc, but it behaves same locally
Loren Segal
@lsegal
@roolo tags cannot be inlined due to the way YARD structures docstring data and renders HTML.
You may not want to use example tags in that case, or use the header text in the form @example DESCRIPTION TEXT
Generally though, it doesn't seem like you want to use example tags in that specific case. Those aren't usage examples of an API, those are just blocks of code related to your APIs functionality.
Mailo Světel
@roolo
@lsegal Ty. In the end went with dropping the @example tag -- bbatsov/rubocop#4870
markus7811
@markus7811
Hi, i hope i am right here. I started using yard to document sparkleformation (a ruby dsl). But something i can't find out is, if its possible to override the Class - my dsl has no classes, but i want to define the class of a method manuelly by overriding it - if its possible. Or - if not - can i remove the class group of the rendered html files?
Marc Siegel
@ms-ati
Any chance of getting a way to document classes created as constants using the values gem, such as Table = Value.new(:legs), as a class instead of like a normal constant? I've seen there were previous requests for this same feature for Structs, which would work analogously. A @!class directive perhaps?
Loren Segal
@lsegal
@ms-ati using @!parse can get you there
Marc Siegel
@ms-ati
@lsegal could you give an example of that working, using generated class assigned to a constant? I'm using @!parse but Yard 0.9.12 is still parsing it as a constant
Jeff Dickey
@jdickey
Is anyone here? How can I completely hide a class method from generated documentation?
Jeff Dickey
@jdickey
I've tried marking the method as @private and adding the --no-private option to .yardopts and it's still in the generated docs
Jeff Dickey
@jdickey
If anyone's interested, I got it. I was using @api private when I should have been using @private.
Maciej Mensfeld
@mensfeld
Good afternoon
@here is this alive?
@lsegal is there a way to make yard find methods that have undocumented parameters?
Samuel Williams
@ioquatix
I've been discussing how to make best use of **options with YARD documentation, and I wonder if there is a missed opportunity.
@lsegal in Ruby 3.0 **options may no longer be a hash - and even now that detail might be better off considered an implementation detail. I wonder if when a user writes **options we could explicitly mark it as "Keyword Arguments", for example. Anyway, just a discussion point that as we head towards Ruby 3.0, may become more important.
Samuel Williams
@ioquatix
@olleolleolle perhaps worth discussing here?
Olle Jonsson
@olleolleolle
:wave:
Oh, hello, I'm a user of YARD, and I'd be excited about having "comment suffix for @see" support, so that my references to related methods could be described.
Samuel Williams
@ioquatix
@lsegal we've been discussing how @see works, and we want to add something like "@see Foo#bar invoked if the widget is too big" and have it format as "See Also: • Foo#bar - invoked if the widget is too big"
Right now it formats the entire text as a link which is a bit awkward.
Olle Jonsson
@olleolleolle
image.png
Here's an illustration of the current workaround: # @see Endpoint.udp udp - invoked when parsing a URL with the udp scheme: "udp://127.0.0.1" Note the repetition of the udp word.
Olle Jonsson
@olleolleolle
Another observation: [warn]: @param tag has unknown parameter name: **options for a line like # @param **options keyword arguments passed straight through to {#initialize}
Samuel Williams
@ioquatix
If you write @param options does it format correctly and look the same?
Olle Jonsson
@olleolleolle
image.png
# @param options keyword arguments passed straight through to {#initialize}
Samuel Williams
@ioquatix
I think that's okay too
Samuel Williams
@ioquatix
@lsegal would you be interested in a PR?
Maciej Mensfeld
@mensfeld
Hey
something like .sort_by! { |file_path| [file_path.count('/'), file_path] }
to make sure the files higher in hierarchy are actually first?
now when we have two files /a/baaaaaaaaaaaaaa.rb and /a/b/a.rb the more nested will be actually first
so we should sort in a way, that will make the less nested files first despite their length
this should minimize the order churn as well
Maciej Mensfeld
@mensfeld
@lsegal it seems yard no longer reports undocumented methods :(