class GL::Registry::Token
@abstract Base class for OpenGL registry defined items.
Attributes
comment[R]
@return [String?] an arbitrary comment associated with this object.
Public Class Methods
new(node)
click to toggle source
Creates a new instance of the {Token} class.
@param node [Ox::Element] The XML element defining the instance.
# File lib/opengl/registry/token.rb, line 16 def initialize(node) raise ArgumentError, 'item node cannot be nil' unless node @comment = node[Words::COMMENT] end
Public Instance Methods
to_s()
click to toggle source
@return [String] the string representation of this object.
Calls superclass method
# File lib/opengl/registry/token.rb, line 24 def to_s @name || super end