Class: Yard2steep::AST::ConstantNode
- Inherits:
-
Object
- Object
- Yard2steep::AST::ConstantNode
- Defined in:
- lib/yard2steep/ast/constant_node.rb
Instance Attribute Summary collapse
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#v_type ⇒ Object
readonly
Returns the value of attribute v_type.
Instance Method Summary collapse
-
#initialize(name:, klass:, v_type:) ⇒ ConstantNode
constructor
A new instance of ConstantNode.
- #long_name ⇒ String
Constructor Details
#initialize(name:, klass:, v_type:) ⇒ ConstantNode
Returns a new instance of ConstantNode.
10 11 12 13 14 15 |
# File 'lib/yard2steep/ast/constant_node.rb', line 10 def initialize(name:, klass:, v_type:) Util.assert! { name.is_a?(String) } @name = name @klass = klass @v_type = v_type end |
Instance Attribute Details
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
5 6 7 |
# File 'lib/yard2steep/ast/constant_node.rb', line 5 def klass @klass end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/yard2steep/ast/constant_node.rb', line 5 def name @name end |
#v_type ⇒ Object (readonly)
Returns the value of attribute v_type.
5 6 7 |
# File 'lib/yard2steep/ast/constant_node.rb', line 5 def v_type @v_type end |
Instance Method Details
#long_name ⇒ String
18 19 20 |
# File 'lib/yard2steep/ast/constant_node.rb', line 18 def long_name "#{@klass.long_name}::#{@name}" end |