Class: RuboCop::Cop::ParamHelp::ParameterTag

Inherits:
Struct
  • Object
show all
Defined in:
lib/rubocop/cop/mixin/param_help.rb

Overview

"@param" tag with data from Yard and parsed source code

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#desc_posInteger

Returns the value of attribute desc_pos

Returns:

  • (Integer)

    the current value of desc_pos



21
22
23
# File 'lib/rubocop/cop/mixin/param_help.rb', line 21

def desc_pos
  @desc_pos
end

#description_linesArray<String>

Returns the value of attribute description_lines

Returns:

  • (Array<String>)

    the current value of description_lines



21
22
23
# File 'lib/rubocop/cop/mixin/param_help.rb', line 21

def description_lines
  @description_lines
end

#nameString

Returns the value of attribute name

Returns:

  • (String)

    the current value of name



21
22
23
# File 'lib/rubocop/cop/mixin/param_help.rb', line 21

def name
  @name
end

#tag_rangeParser::Source::Range

Returns the value of attribute tag_range

Returns:

  • (Parser::Source::Range)

    the current value of tag_range



21
22
23
# File 'lib/rubocop/cop/mixin/param_help.rb', line 21

def tag_range
  @tag_range
end

#tag_source_lineParser::Source::Comment

Returns the value of attribute tag_source_line

Returns:

  • (Parser::Source::Comment)

    the current value of tag_source_line



21
22
23
# File 'lib/rubocop/cop/mixin/param_help.rb', line 21

def tag_source_line
  @tag_source_line
end

#type_posInteger

Returns the value of attribute type_pos

Returns:

  • (Integer)

    the current value of type_pos



21
22
23
# File 'lib/rubocop/cop/mixin/param_help.rb', line 21

def type_pos
  @type_pos
end

#type_rangeParser::Source::Range

Returns the value of attribute type_range

Returns:

  • (Parser::Source::Range)

    the current value of type_range



21
22
23
# File 'lib/rubocop/cop/mixin/param_help.rb', line 21

def type_range
  @type_range
end

#typesArray<String>

Returns the value of attribute types

Returns:

  • (Array<String>)

    the current value of types



21
22
23
# File 'lib/rubocop/cop/mixin/param_help.rb', line 21

def types
  @types
end

#types_sString

Returns the value of attribute types_s

Returns:

  • (String)

    the current value of types_s



21
22
23
# File 'lib/rubocop/cop/mixin/param_help.rb', line 21

def types_s
  @types_s
end

Instance Method Details

#description_openingString?

First line of description, usually the part on the "@param" line

Returns:

  • (String, nil)


29
30
31
# File 'lib/rubocop/cop/mixin/param_help.rb', line 29

def description_opening
  description_lines.first
end