Sha256: 3b044feee64b6fff68c37a9ad9da3b57d18fab90ad381d47c7be41c440730422
Contents?: true
Size: 1.1 KB
Versions: 2
Compression:
Stored size: 1.1 KB
Contents
# encoding: utf-8 # frozen_string_literal: true module Carbon module Concrete module Item class Class # An element of a class. 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. class Element # The name of the element. # # @return [::String] attr_reader :name # The type of the element. # # @return [Type] attr_reader :type # 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. def initialize(name, type) @name = name @type = type deep_freeze! end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
carbon-core-0.2.1 | lib/carbon/concrete/item/class/element.rb |
carbon-core-0.2.0 | lib/carbon/concrete/item/class/element.rb |