Class: YARDSorbet::TStructProp

Inherits:
T::Struct
  • Object
show all
Defined in:
lib/yard-sorbet/t_struct_prop.rb

Overview

Used to store the details of a T::Struct prop definition

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(default: nil, doc:, prop_name:, source:, types:) ⇒ void

Parameters:

  • default (String, nil) (defaults to: nil)
  • doc (String)
  • prop_name (String)
  • source (String)
  • types (Array<String>)


# File ''

const :default, T.nilable(String)
const :doc, String
const :prop_name, String
const :source, String
const :types, T::Array[String]

Instance Attribute Details

#defaultString? (readonly)

Returns the value of attribute default.

Returns:

  • (String, nil)


# File ''

const :default, T.nilable(String)

#docString (readonly)

Returns the value of attribute doc.

Returns:

  • (String)


# File ''

const :doc, String

#prop_nameString (readonly)

Returns the value of attribute prop_name.

Returns:

  • (String)


# File ''

const :prop_name, String

#sourceString (readonly)

Returns the value of attribute source.

Returns:

  • (String)


# File ''

const :source, String

#typesArray<String> (readonly)

Returns the value of attribute types.

Returns:

  • (Array<String>)


# File ''

const :types, T::Array[String]