Class: Xumlidot::Types::Superklass
- Defined in:
- lib/xumlidot/types/superklass.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Constant
Instance Method Summary collapse
- #<<(constant) ⇒ Object
-
#initialize(name, namespace = nil) ⇒ Superklass
constructor
A new instance of Superklass.
-
#to_klass ⇒ Object
Create a klass from the superclass for adding to the list of constants.
Methods inherited from Constant
Constructor Details
#initialize(name, namespace = nil) ⇒ Superklass
Returns a new instance of Superklass.
8 9 10 11 |
# File 'lib/xumlidot/types/superklass.rb', line 8 def initialize(name, namespace = nil) super @has_root = false end |
Instance Method Details
#<<(constant) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/xumlidot/types/superklass.rb', line 13 def <<(constant) if constant == '::' @has_root = true return end @namespace << constant unless @name.nil? @name ||= constant end |