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