lib/rdoc/generator/markdown.rb in rdoc-markdown-0.1.13 vs lib/rdoc/generator/markdown.rb in rdoc-markdown-0.1.14
- old
+ new
@@ -4,10 +4,11 @@
require "pathname"
require "erb"
require "reverse_markdown"
require 'extralite'
+require 'active_support/core_ext/string/inflections'
class RDoc::Generator::Markdown
RDoc::RDoc.add_generator self
TEMPLATE_DIR = File.expand_path(
@@ -104,26 +105,26 @@
next if method.visibility.to_s.eql?("private")
result << {
name: "#{klass.full_name}.#{method.name}",
type: "Method",
- path: turn_to_path(klass.full_name)
+ path: "#{turn_to_path(klass.full_name)}#meth-#{ActiveSupport::Inflector.parameterize method.name}"
}
end
klass.constants.sort_by { |x| x.name }.each do |const|
result << {
name: "#{klass.full_name}.#{const.name}",
type: "Constant",
- path: turn_to_path(klass.full_name)
+ path: "#{turn_to_path(klass.full_name)}#const-#{ActiveSupport::Inflector.parameterize const.name}"
}
end
klass.attributes.sort_by { |x| x.name }.each do |attr|
result << {
name: "#{klass.full_name}.#{attr.name}",
type: "Attribute",
- path: turn_to_path(klass.full_name)
+ path: "#{turn_to_path(klass.full_name)}#attr-#{ActiveSupport::Inflector.parameterize attr.name}"
}
end
end
result.each do |rec|