Modify RDoc to pick up my attribute metaprogramming methods?

Discussion in 'Ruby' started by Clifford Heath, Apr 3, 2007.

  1. Those of you who might have used my Chattr gem will
    have found that RDoc doesn't find the attributes it
    defines. This is because hidden inside RDoc's Ruby
    parser (parsers/parse_rb.rb), in parse_statements,
    is a case statement that matches the known kernel
    metaprogramming methods.

    If you want to add to these methods, you can add them
    on the command line if you use --accessors, which is
    fine if the syntax is the same (parameters are all
    Symbols), but mine aren't.

    Really I need a way during Chattr's initialization,
    to add an accessor and associated block to RDoc, so
    RDoc passes an array of params to the block, from
    which it can filter the symbols. That way any program
    that requires Chattr automagically gets RDoc for
    Chattrs methods.

    What do you reckon? Is this a good idea? Is there a
    better way? Who do I need to contact about the required
    RDoc changes - is this core now?

    Clifford Heath.
    Clifford Heath, Apr 3, 2007
    #1
    1. Advertising

  2. Surely enough people are creating metaprogramming
    methods that they must also want RDoc to do this?

    Ara - how well does RDoc document arrayfields for
    example? Wouldn't you want to add something to
    arrayfields produces suitable doc for RDoc?
    Ok, so the arrayfields extension is dynamic, that
    makes it hard... but still...

    Anyone?

    Clifford Heath.
    Clifford Heath, Apr 4, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tom c
    Replies:
    5
    Views:
    386
    tom c
    Nov 1, 2006
  2. James Britt
    Replies:
    28
    Views:
    434
    Jim Weirich
    Nov 8, 2004
  3. Hans  Fugal

    Metaprogramming and rdoc

    Hans Fugal, Nov 16, 2005, in forum: Ruby
    Replies:
    3
    Views:
    121
    Joel VanderWerf
    Nov 16, 2005
  4. Pau Garcia i Quiles

    RDoc vs metaprogramming

    Pau Garcia i Quiles, Oct 15, 2006, in forum: Ruby
    Replies:
    6
    Views:
    143
    Ken Bloom
    Oct 16, 2006
  5. dkmd_nielsen
    Replies:
    6
    Views:
    204
    Joel VanderWerf
    Nov 26, 2008
Loading...

Share This Page