Module: YARD::Templates::Helpers::BaseHelper

Defined in:
lib/yard-components.rb

Overview

Add a method to facilitate linking to components

Instance Method Summary collapse

Instance Method Details

Parameters:

  • component_name (String)


17
18
19
# File 'lib/yard-components.rb', line 17

def link_component(component_name)
  link_file("component-#{component_name}", component_name)
end

#linkify(*args) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/yard-components.rb', line 8

def linkify(*args)
  if args.first.is_a?(String) && args.first =~ /^component:(.*)/
    link_component($1)
  else
    linkify_pre_yard_components(*args)
  end
end

#linkify_pre_yard_componentsObject



6
# File 'lib/yard-components.rb', line 6

alias_method :linkify_pre_yard_components, :linkify