class Foo
  attr_accessor :ignoreme

  # IMPLICIT METHOD!
  # @return [String]
  just_a_method_for :implicit0

  # IMPLICIT METHOD2!
  # @!scope class
  just_a_method_for :implicit1

  # IMPLICIT METHOD3!
  # @!visibility protected
  just_a_method_for :implicit2

  # Not recognized
  just_a_method_for :implicit_invalid

  #
  ## IS NOT RECOGNIZED!
  just_a_method_for :implicit_invalid2

  # @deprecated don't use this
  just_a_method_for :implicit_invalid3

  ##
  # IS RECOGNIZED!
  just_a_method_for 'implicit_valid'

  # @!attribute [r]
  # @return [Numeric] a number
  a_readable_attribute :attr1

  # @!attribute [w]
  a_writable_attribute :attr2, 'bar'

  # @!attribute
  default_attribute :attr3

  # @!attribute custom
  default_attribute :attr4

  # @!method xyz(a, b, c)
  # The foo method
  # @param [String] a
  # @!visibility protected
  # @!scope class
  foo_bar

  # @!macro property
  #   @!method $1(${3-})
  #   A $0 that is awesome.
  #   @param $3 first parameter
  #   @return [$2] the property $1
  property :name, String, :a, :b, :c

  # @!macro property
  property :age, Fixnum, :value

  # This is just for x
  # @!macro [attach] parser
  #   @!method $1(opts = {})
  #   @return NOTHING!
  parser :x

  parser :c_parser

  # Another docstring
  parser :d_parser

  # @!macro [attach] none
  #   @!method none(foo, bar)
  none

  # @!macro something
  #   @!method $1(a, b, c)
  something :qux

  # @!method qux2(a, b, c)
  something

  # @!macro
  #   $1 $2 $3
  def regular_meth(a, b, c) end

  # @!macro [new] different
  #   @!method $2_name(a = 1)

  # @!macro different
  implicit_with_different_method_name :wrong, :right

  # @!scope module
  a_module_function :modfunc1
end

module MyMixin
  # @!macro [attach] special
  #   DSL method $1
  def defined_by_mixin; end
end

class Bar
  parser :x_parser
end

class Baz < Foo
  extend MyMixin
  parser :y_parser
  none { }
  defined_by_mixin :mixin_method
end

# @!method my_other_method
# Docstring for method
method_that_makes_a_method

# @!macro something
foobarbaz :beep

module DSLMethods
  # @macro [attach] dsl_method
  #   Returns $2 for $1
  dsl_method :foo, String
  dsl_method :bar, Integer
end
