Questions tagged [yard]

YARD stands for "Yay! A Ruby Documentation tool". It is considered an alternative to the rdoc tool with more features.

YARD stands for "Yay! A Ruby Documentation tool". It is considered an alternative to the rdoc tool with more features. The YARD website says:

YARD is a documentation generation tool for the Ruby programming language. It enables the user to generate consistent, usable documentation that can be exported to a number of formats very easily, and also supports extending for custom Ruby constructs such as custom class level definitions.

YARD's notable features include:

  • Preview as you document
  • Easily customize templates
  • Support your own DSL
  • Extend, extend, extend!

And of course YARD comes with much more functionality, including the ability to serve documentation for gems, the ability to group methods into logical sections, and much more.

195 questions
1
vote
0 answers

Python yard-plot ROC curve generation incorrect

I'm trying to graph the results of a binary classifier as a ROC curve (hit rate vs false alarm rate) using yard-plot. The problem is that the graph does not reflect my data. The command I call is: C:\Python26\Scripts\yard-plot.exe -o…
Liam Steele
  • 146
  • 8
1
vote
1 answer

Document class_attribute with yard

How do I tell yard to document class attributes that are set up with Rails' class_attribute method? Currently it's just ignoring them. An example: class Base class_attribute :defaults self.defaults = { foo: 'bar' } end
elstgav
  • 1,001
  • 7
  • 20
1
vote
1 answer

Replacing RDoc with YARD in Rails 4.2

Is it possible to replace RDoc with YARD in Rails 4.2? I'd like rake doc:app to invoke YARD rather than RDoc. In my Gemfile I replaced sdoc with YARD (gem 'yard', '~> 0.8.0', group: :doc) with no luck.
anthonator
  • 4,915
  • 7
  • 36
  • 50
1
vote
1 answer

yard server yields 'invalid number of elements (3 for 1..2)'

I am trying to document my Rails application with yard. yardoc produces the desired output in the doc folder. Then I fire up yard server, and I get the message >> YARD 0.8.7.6 documentation server at http://0.0.0.0:8808 [2014-12-05 17:09:51] INFO …
klaffenboeck
  • 6,297
  • 3
  • 23
  • 33
1
vote
0 answers

Yard graph places class outside of it's module

I have a ruby project with a module and a class defined in the module: a.rb a/b.rb File a.rb contains: require 'a/b' module A end File a/b.rb contains: module A class B end end When I run yardoc ** and then yard graph --full --dependencies |…
mirelon
  • 4,896
  • 6
  • 40
  • 70
1
vote
1 answer

Deprecating a renamed attribute in Ruby YARD documentation

I have been renaming some attributes in my Ruby mqtt gem, to match the new MQTT specification. I have been doing this by renaming the attribute and then using alias_method to make sure the old methods still work. Here is an example of what I have…
njh
  • 783
  • 3
  • 15
1
vote
1 answer

What's the difference between @tag and @!tag in Yard documentation tool?

While looking at Yard documentation and examples sI found some tags prefixed by an exclamation mark. I found working examples with and without exclamation marks and I wasn't able to spot the difference, so what changes when @!some-tag is used…
Fabio
  • 18,856
  • 9
  • 82
  • 114
1
vote
1 answer

Overriding rake task fails after upgrading to rails 4

I am trying to upgrade my app from rails 3.2.18 to rails 4.0 and I'm stuck on an issue with rake. I have a custom doc.rake task that overrides doc:app with the following code inside that worked fine on rails 3: # Replace Rails' rake doc:app with…
CoolTapes
  • 417
  • 5
  • 14
1
vote
0 answers

Is there a way to use Yard Markup with RDoc in a Gem?

The exact question is: How can I instruct gem to generate my documentation with Yard. The old way using #has_rdoc doesn't function any more. I cannot find the method to do it using metadata in newer GemSpec versions. I would prefer using Yard over…
Andrei Beliankou
  • 684
  • 7
  • 17
1
vote
1 answer

Make YARD ignore certain class extensions

I am getting several warnings when generating my project documentation because YARD cannot parse some external class extensions [warn]: in YARD::Handlers::Ruby::MixinHandler: Undocumentable mixin: YARD::Parser::UndocumentableError for class…
SystematicFrank
  • 16,555
  • 7
  • 56
  • 102
1
vote
1 answer

How can I use yard doc in ActiveAdmin?

When I add a new index page in activeadmin, I write some code like this: # A default activeadmin page for yard overview ActiveAdmin.register AdminUser do permit_params :email, :password, :password_confirmation index do column :email …
homeway
  • 11
  • 2
1
vote
0 answers

YARD attr_writer when manually created the reader

I've created two attr_writer in a class, let's call them foo and bar. # @attr_writer [String] foo Description of a writeonly attribute class Baz attr_writer :foo, :bar # @return .... def foo ; end def bar ; end end YARD will not render the…
SandeliusME
  • 802
  • 1
  • 10
  • 19
1
vote
2 answers

Documenting methods in top-level namespace with YARD

I documented some Ruby code using YARD and I am having trouble getting the YARD documentation I created for some methods in top-level name space to show up in yardoc's HTML output. My documentation looks essentially the same as the YARD gem's own…
1
vote
2 answers

Rails RESTfull API Documentation

im searching for a Documentation Framework that supports the following features: Generated from Code Comments Searchable Styling customizable NTH: Linked references (If i reference a class somewhere class name should be linked to class…
MaThGo
  • 45
  • 1
  • 8
1
vote
2 answers

Gemfile: Make sure some gems are available on the machine, but don't need to be loaded for the project

I didn't work with RoR for 2-3 years, but now I'm back in business, and I really like the bundle command. But I'm a bit unsure how to make sure my fellow developers have all gems installed that are not strictly part of the Rails application. For…
Joshua Muheim
  • 12,617
  • 9
  • 76
  • 152