Comments (2)
I don't see the need to have different generator names from the class name. Generator names should be short and simple so they're easy for the user to type after -f, and so should the class name.
The example in the documentation does not produce "generator":
irb> My::Awesome::Generator.name.sub(/^RDoc::Generator::/, '').downcase
=> "my::awesome::generator"
from rdoc.
My mistake, my::awesome::generator
is what I meant to put.
I have written a few generators, and as I do with any project, I was writing the code thusly:
# lib/coolname/generator.rb
module CoolName
class Generator
...
end
end
So that my project has proper namespace. But I obviously don't want the format to be coolname::generator
, I just want it to be coolname
. That is why one might want the format name to differ from the class name.
In any case it's not that big a deal since one can just hack around it by redefining the name
class method. On the hand, b/c of this issue I'm now inclined to just name the classes RDoc::Generator::CoolName
-- I'm not sure how that fairs for best practices, but it seems to be what RDoc wants me to do given the definition of #add_generator.
from rdoc.
Related Issues (20)
- On the main doc TOC page, some URL fragments are incorrect
- Enumerable#inject has incorrect examples HOT 2
- [Bug] Cannot link to constants in Markdown
- Incorrect module aliasing
- [Bug] Cannot insert a link after a left curly bracket appears HOT 1
- [Feature Request] Remove comments which starts with :no-doc
- [Bug] Symbol is modified when declared with %s HOT 1
- Inline HTML extension in Markdown generator not working HOT 2
- The Markdown support works poorly with nested markups
- Changelog / release notes HOT 1
- Wrong license listed in LEGAL
- Update licenses listed in gem HOT 1
- [email protected]
- Fill release notes < 5.1.0
- Place fonts in a separate gem
- Concern about psych v5+ dependency HOT 1
- 6.5.0 fails to properly parse ruby-3.2.0 source directory
- Code climate markdown code is broken
- Add :deprecated: and :since: directives HOT 1
- Possible ReDos in the read_directive method HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rdoc.