Class: Rucoa::Definitions::ConstantDefinition
- Defined in:
- lib/rucoa/definitions/constant_definition.rb
Overview
Represents class definition, module definition, or constant assignment.
Direct Known Subclasses
Instance Attribute Summary collapse
- #qualified_name ⇒ String readonly
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(qualified_name:, **keyword_arguments) ⇒ ConstantDefinition
constructor
A new instance of ConstantDefinition.
- #name ⇒ String
- #namespace ⇒ String
Constructor Details
#initialize(qualified_name:, **keyword_arguments) ⇒ ConstantDefinition
Returns a new instance of ConstantDefinition.
11 12 13 14 15 16 17 |
# File 'lib/rucoa/definitions/constant_definition.rb', line 11 def initialize( qualified_name:, **keyword_arguments ) super(**keyword_arguments) @qualified_name = qualified_name end |
Instance Attribute Details
#qualified_name ⇒ String (readonly)
8 9 10 |
# File 'lib/rucoa/definitions/constant_definition.rb', line 8 def qualified_name @qualified_name end |
Instance Method Details
#name ⇒ String
33 34 35 |
# File 'lib/rucoa/definitions/constant_definition.rb', line 33 def name names.last end |
#namespace ⇒ String
51 52 53 |
# File 'lib/rucoa/definitions/constant_definition.rb', line 51 def namespace names[..-2].join('::') end |