Class: JsxRosetta::AST::JSXOpeningElement

Inherits:
Node
  • Object
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

Constructor Details

This class inherits a constructor from JsxRosetta::AST::Node

Instance Method Details

#attributesObject



66
67
68
# File 'lib/jsx_rosetta/ast/types.rb', line 66

def attributes
  self[:attributes]
end

#nameObject



62
63
64
# File 'lib/jsx_rosetta/ast/types.rb', line 62

def name
  self[:name]
end

#self_closing?Boolean

Returns:

  • (Boolean)


74
75
76
# File 'lib/jsx_rosetta/ast/types.rb', line 74

def self_closing?
  @raw["selfClosing"] == true
end

#tag_nameObject



70
71
72
# File 'lib/jsx_rosetta/ast/types.rb', line 70

def tag_name
  node_to_tag_name(name)
end