class Carbon::Concrete::Item::Struct::Element

An element of a struct. Contains name and type information, and that's it.

@api private @note

**This class is frozen upon initialization.**  This means that any
attempt to modify it will result in an error.  In most cases, the
attributes on this class will also be frozen, as well.

Attributes

name[R]

The name of the element.

@return [::String]

type[R]

The type of the element.

@return [Type]

Public Class Methods

new(name, type) click to toggle source

Initialize the element with the given name and type.

@see name @see type @param name [::String] The name of the element. @param type [Type] The type of the element.

# File lib/carbon/concrete/item/struct/element.rb, line 33
def initialize(name, type)
  @name = name
  @type = type
  deep_freeze!
end