Sha256: 49c92515be9d816b6de154c47214e59ffa493df27df4557d7174cbac2a04eef8

Contents?: true

Size: 526 Bytes

Versions: 3

Compression:

Stored size: 526 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

3 entries across 3 versions & 1 rubygems

Version Path
deg-yard-0.8.7.4 templates/guide/method/html/setup.rb
deg-yard-0.8.7.3 templates/guide/method/html/setup.rb
deg-yard-0.8.7.1 templates/guide/method/html/setup.rb