Included Modules

Class/Module Index [+]

Quicksearch

YARD::Handlers::Ruby::DSLHandlerMethods

Constants

IGNORE_METHODS

Public Instance Methods

handle_comments() click to toggle source
# File lib/yard/handlers/ruby/dsl_handler_methods.rb, line 12
def handle_comments
  return if IGNORE_METHODS[caller_method]

  @docstring = statement.comments || ""
  @docstring = @docstring.join("\n") if @docstring.is_a?(Array)
  if macro = find_attached_macro
    @docstring += "\n" +
      macro.expand([caller_method, *call_params], statement.source)
  elsif !statement.comments_hash_flag && !implicit_docstring?
    return register_docstring(nil)
  end

  # ignore DSL definitions if @method/@attribute directive is used
  if @docstring =~ /^@!?(method|attribute)\b/
    return register_docstring(nil)
  end

  object = MethodObject.new(namespace, method_name, scope)
  object.signature = method_signature
  register(object)
end
register_docstring(object, docstring = @docstring, stmt = statement) click to toggle source
# File lib/yard/handlers/ruby/dsl_handler_methods.rb, line 34
def register_docstring(object, docstring = @docstring, stmt = statement)
  super
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.