aboutsummaryrefslogtreecommitdiff
path: root/doc/api/ruby
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-10 15:25:35 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-10 17:30:23 +0100
commit8e0376bf0e0f0e900a0d514e9354e0746b2e0e84 (patch)
treefe721bb72abb423cc0f927e09c87bc5c3ec0cd5a /doc/api/ruby
parentbdfc1539b10089dcbfaa23c519f088b6c2a912ce (diff)
downloadpaludis-8e0376bf0e0f0e900a0d514e9354e0746b2e0e84.tar.gz
paludis-8e0376bf0e0f0e900a0d514e9354e0746b2e0e84.tar.xz
Move some headers to legacy
Diffstat (limited to 'doc/api/ruby')
-rw-r--r--doc/api/ruby/create_ruby_doc.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/doc/api/ruby/create_ruby_doc.rb b/doc/api/ruby/create_ruby_doc.rb
index 84db5cd81..3ae25f63c 100644
--- a/doc/api/ruby/create_ruby_doc.rb
+++ b/doc/api/ruby/create_ruby_doc.rb
@@ -62,7 +62,12 @@ module RDoc
def generate_consts(header, type, in_class)
consts = []
- file = File.read(ENV["TOP_SRCDIR"] + "/#{header}")
+ if File.exist?(ENV["TOP_SRCDIR"] + "/#{header}")
+ file = File.read(ENV["TOP_SRCDIR"] + "/#{header}")
+ else
+ file = File.read(ENV["TOP_SRCDIR"] + "/#{header.sub(%r[^paludis/], "paludis/legacy/")}")
+ end
+
match = Regexp.new(/enum\s+#{type}\s+\{([^}]+)\}/)#, Regexp::MULTILINE)
if file =~ match
enum = $1