Method: YARD::Templates::Helpers::HtmlHelper#anchor_for
- Defined in:
- lib/yard/templates/helpers/html_helper.rb
permalink #anchor_for(object) ⇒ String
Returns the anchor for a specific object.
279 280 281 282 283 284 285 286 287 288 289 290 291 292 |
# File 'lib/yard/templates/helpers/html_helper.rb', line 279 def anchor_for(object) case object when CodeObjects::MethodObject "#{object.name}-#{object.scope}_#{object.type}" when CodeObjects::ClassVariableObject "#{object.name.to_s.gsub('@@', '')}-#{object.type}" when CodeObjects::Base "#{object.name}-#{object.type}" when CodeObjects::Proxy object.path else object.to_s end end |