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