Class: Refract::ClassNode
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#constant_path ⇒ Object
Returns the value of attribute constant_path.
-
#superclass ⇒ Object
Returns the value of attribute superclass.
Instance Method Summary collapse
-
#initialize(prism_node: nil, constant_path:, superclass:, body:) ⇒ ClassNode
constructor
A new instance of ClassNode.
Methods inherited from Node
#accept, #copy, #start_line, #type, type
Constructor Details
#initialize(prism_node: nil, constant_path:, superclass:, body:) ⇒ ClassNode
Returns a new instance of ClassNode.
5 6 7 8 9 10 11 |
# File 'lib/refract/nodes/class_node.rb', line 5 def initialize(prism_node: nil, constant_path:, superclass:, body:) @prism_node = prism_node => Prism::Node | nil @constant_path = constant_path @superclass = superclass @body = body freeze end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
13 14 15 |
# File 'lib/refract/nodes/class_node.rb', line 13 def body @body end |
#constant_path ⇒ Object
Returns the value of attribute constant_path.
13 14 15 |
# File 'lib/refract/nodes/class_node.rb', line 13 def constant_path @constant_path end |
#superclass ⇒ Object
Returns the value of attribute superclass.
13 14 15 |
# File 'lib/refract/nodes/class_node.rb', line 13 def superclass @superclass end |