Sha256: 6e1347b45e1862a22900cce16679da6819be167b9c2aa3d32c587186a5899ec7

Contents?: true

Size: 505 Bytes

Versions: 76

Compression:

Stored size: 505 Bytes

Contents

def init
  sections :header, [T('docstring')]
end

def format_args(object)
  return if object.parameters.nil?
  params = object.parameters
  if object.has_tag?(:yield) || object.has_tag?(:yieldparam)
    params.reject! do |param|
      param[0].to_s[0,1] == "&" &&
        !object.tags(:param).any? {|t| t.name == param[0][1..-1] }
    end
  end

  unless params.empty?
    args = params.map {|n, v| v ? "<em>#{h n}</em> = #{h v}" : "<em>" + n.to_s + "</em>" }.join(", ")
    args
  else
    ""
  end
end

Version data entries

76 entries across 59 versions & 8 rubygems

Version Path
abaci-0.3.0 vendor/bundle/gems/yard-0.9.1/templates/guide/method/html/setup.rb
abaci-0.3.0 vendor/bundle/gems/yard-0.9.2/templates/guide/method/html/setup.rb
yard-0.9.5 templates/guide/method/html/setup.rb
yard-0.9.4 templates/guide/method/html/setup.rb
yard-0.9.3 templates/guide/method/html/setup.rb
yard-0.9.2 templates/guide/method/html/setup.rb
yard-0.9.1 templates/guide/method/html/setup.rb
yard-0.9.0 templates/guide/method/html/setup.rb
yard-0.8.7.6 templates/guide/method/html/setup.rb
yard-0.8.7.5 templates/guide/method/html/setup.rb
climine-0.0.7 vendor/bundle/ruby/2.1.0/gems/yard-0.8.7.3/templates/guide/method/html/setup.rb
climine-0.0.7 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/templates/guide/method/html/setup.rb
climine-0.0.6 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/templates/guide/method/html/setup.rb
climine-0.0.5 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/templates/guide/method/html/setup.rb
yard-0.8.7.4 templates/guide/method/html/setup.rb
climine-0.0.4 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/templates/guide/method/html/setup.rb
climine-0.0.3 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/templates/guide/method/html/setup.rb
mango-0.8.0 vendor/bundler/ruby/2.1.0/gems/yard-0.8.7.3/templates/guide/method/html/setup.rb
mango-0.7.1 vendor/bundler/ruby/2.0.0/gems/yard-0.8.7.3/templates/guide/method/html/setup.rb
mango-0.7.0 vendor/bundler/ruby/2.0.0/gems/yard-0.8.7.3/templates/guide/method/html/setup.rb