Class YARD::BaseTypeTag

Object
  |
  +--YARD::BaseTag
      |
      +--YARD::BaseTypeTag

Similar to the BaseTag, this class allows for a tag to formally specify type data if it depends on a specific object type.


Attributes

types [R]

Constructor Summary

initialize(text, types = [])

Create a new object with formally specified types

Parameters:
[String] text - the text data
[Array] types - the types that are formally specified by the tag.

Public Class Method Summary

Array extract_name_and_text(text)
      Extracts the name from raw tag text returning the name and remaining value .
Array extract_types_and_text(text)
      Extracts the type signatures from the raw tag text .

Public class methods inherited from YARD::BaseTag
tag_library, tag_name, parse_tag, inherited

Public Instance Method Summary

type
      Convenience method to access the first type specified .
Object types
      Returns the value of attribute types .
Object types=(value)
      Sets the attribute types .

Public instance methods inherited from YARD::BaseTag
text, tag_name, text=

Public Class Method Details

extract_name_and_text

public Array self.extract_name_and_text(text)

Extracts the name from raw tag text returning the name and remaining value

Parameters:
[String] text - the raw tag text
Returns:
an array holding the name as the first element and the value as the second element

extract_types_and_text

public Array self.extract_types_and_text(text)

Extracts the type signatures from the raw tag text

Parameters:
[String] text - the raw tag text
Returns:
an array holding the value as the first element and the array of types as the second element

Public Instance Method Details

type

public Object type

Convenience method to access the first type specified. This should mainly be used for tags that only specify one type.

Returns:
(String) the first of the list of specified types

types

public Object types

Returns the value of attribute types


types=

public Object types=(value)

Sets the attribute types

Parameters:
value - the value to set the attribute types to.