Class: RubyLint::Docstring::ParamTag

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby-lint/docstring/param_tag.rb

Overview

The ParamTag class contains information about YARD @param tags such as the types of the parameter.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ ParamTag

Returns a new instance of ParamTag

Parameters:

  • options (Hash) (defaults to: {})


22
23
24
25
26
# File 'lib/ruby-lint/docstring/param_tag.rb', line 22

def initialize(options = {})
  @name        = options[:name]
  @types       = options[:types] || []
  @description = options[:description]
end

Instance Attribute Details

#descriptionString (readonly)

Returns:



16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/ruby-lint/docstring/param_tag.rb', line 16

class ParamTag
  attr_reader :name, :types, :description

  ##
  # @param [Hash] options
  #
  def initialize(options = {})
    @name        = options[:name]
    @types       = options[:types] || []
    @description = options[:description]
  end
end

#nameString (readonly)

Returns:



16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/ruby-lint/docstring/param_tag.rb', line 16

class ParamTag
  attr_reader :name, :types, :description

  ##
  # @param [Hash] options
  #
  def initialize(options = {})
    @name        = options[:name]
    @types       = options[:types] || []
    @description = options[:description]
  end
end

#typesArray (readonly)

Returns:

  • (Array)


16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/ruby-lint/docstring/param_tag.rb', line 16

class ParamTag
  attr_reader :name, :types, :description

  ##
  # @param [Hash] options
  #
  def initialize(options = {})
    @name        = options[:name]
    @types       = options[:types] || []
    @description = options[:description]
  end
end