Class: JsxRosetta::AST::JSXAttribute
- Inherits:
-
Node
- Object
- Node
- JsxRosetta::AST::JSXAttribute
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
#attribute_name ⇒ Object
156
157
158
159
160
161
|
# File 'lib/jsx_rosetta/ast/types.rb', line 156
def attribute_name
case (attr_name = name)
when JSXIdentifier then attr_name.name
when JSXNamespacedName then attr_name.qualified_name
end
end
|
#name ⇒ Object
148
149
150
|
# File 'lib/jsx_rosetta/ast/types.rb', line 148
def name
self[:name]
end
|
#value ⇒ Object
152
153
154
|
# File 'lib/jsx_rosetta/ast/types.rb', line 152
def value
self[:value]
end
|