Class: JsxRosetta::AST::JSXElement
- Inherits:
-
Node
- Object
- Node
- JsxRosetta::AST::JSXElement
show all
- Defined in:
- lib/jsx_rosetta/ast/types.rb
Constant Summary
Constants inherited
from Node
Node::TYPE_REGISTRY
Instance Attribute Summary
Attributes inherited from Node
#raw
Instance Method Summary
collapse
Methods inherited from Node
#==, #[], #children, #deconstruct_keys, #dig, #each_child, #end_pos, #hash, #initialize, #inspect, #loc, #range, register, #start_pos, #type, #walk, wrap
Instance Method Details
#closing_element ⇒ Object
42
43
44
|
# File 'lib/jsx_rosetta/ast/types.rb', line 42
def closing_element
self[:closing_element]
end
|
#jsx_children ⇒ Object
46
47
48
|
# File 'lib/jsx_rosetta/ast/types.rb', line 46
def jsx_children
self[:children]
end
|
#opening_element ⇒ Object
38
39
40
|
# File 'lib/jsx_rosetta/ast/types.rb', line 38
def opening_element
self[:opening_element]
end
|
#self_closing? ⇒ Boolean
54
55
56
|
# File 'lib/jsx_rosetta/ast/types.rb', line 54
def self_closing?
opening_element&.self_closing? || false
end
|
#tag_name ⇒ Object
50
51
52
|
# File 'lib/jsx_rosetta/ast/types.rb', line 50
def tag_name
opening_element&.tag_name
end
|