Class: YardDocExample::MyClass Abstract Deprecated

Inherits:
Object
  • Object
show all
Defined in:
lib/yard_doc_example.rb

Overview

Deprecated.

Use MyOtherClass instead

This class is abstract.

An old implementation, is replaced by MyOtherClass

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attribute_nameString

a full description of the attribute

Returns:

  • (String)

    the current value of attribute_name



21
22
23
# File 'lib/yard_doc_example.rb', line 21

def attribute_name
  @attribute_name
end

#countNumber (readonly)

Returns the number of items.

Returns:

  • (Number)

    the number of items



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/yard_doc_example.rb', line 21

class MyClass
  #
  # @see http://example.com Description of URL
  # @see MyOtherClass#do_something
  #
  # @deprecated Use {MyOtherClass#do_something} instead of this method because
  #   that one is newer.
  #
  # @private
  #
  # @param [Array<String>] arr the arguments passed from input. This
  #   array will be modified.
  # @param arr2 [Array<String, Symbol>] the list of strings and symbols.
  # @param [Hash] opts the options to create a message with.
  # @option opts [String] :subject The subject
  # @option opts [String] :from ('nobody') From address
  # @option opts [String] :to Recipient email
  # @option opts [String] :body ('') The body
  #
  # Some code snippet:
  #   MyClass.new.do_something
  #
  # @example Do someting
  #   MyClass.new.do_something
  #
  # @raise [RuntimeError] description
  #
  # @return [String, nil] the successful result or nil
  #   if an error occurred
  def do_something(arr, arr2, opts:)
  end
end

#name_readonlyHash (readonly)

description of a readonly attribute

Returns:

  • (Hash)

    the current value of name_readonly



21
22
23
# File 'lib/yard_doc_example.rb', line 21

def name_readonly
  @name_readonly
end

#name_writeonly=(value) ⇒ Array<String> (writeonly)

description of writeonly attribute

Parameters:

  • value (Array<String>)

    the value to set the attribute name_writeonly to.

Returns:

  • (Array<String>)

    the newly set value



21
22
23
# File 'lib/yard_doc_example.rb', line 21

def name_writeonly=(value)
  @name_writeonly = value
end

Instance Method Details

#do_something(arr, arr2, opts:) ⇒ String?

Deprecated.

Use YardDocExample::MyOtherClass#do_something instead of this method because that one is newer.

Some code snippet:

MyClass.new.do_something

Examples:

Do someting

MyClass.new.do_something

Parameters:

  • arr (Array<String>)

    the arguments passed from input. This array will be modified.

  • arr2 (Array<String, Symbol>)

    the list of strings and symbols.

  • opts (Hash)

    the options to create a message with.

Options Hash (opts:):

  • :subject (String)

    The subject

  • :from (String) — default: 'nobody'

    From address

  • :to (String)

    Recipient email

  • :body (String) — default: ''

    The body

Returns:

  • (String, nil)

    the successful result or nil if an error occurred

Raises:

  • (RuntimeError)

    description

See Also:

Since:

  • 0.6.0



50
51
# File 'lib/yard_doc_example.rb', line 50

def do_something(arr, arr2, opts:)
end