Class: JsxRosetta::IR::Attribute
- Inherits:
-
Data
- Object
- Data
- JsxRosetta::IR::Attribute
- Includes:
- Node
- Defined in:
- lib/jsx_rosetta/ir/types.rb
Overview
A name/value pair on an Element or ComponentInvocation.
name : String value : String | true | Interpolation
- String: literal value from a JSX string-literal attribute
(e.g. `type="button"` → value: "button").
- true: boolean attribute with no value (e.g. `<input disabled />`).
- Interpolation: expression-container value (e.g. `href={url}`).
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name
103 104 105 |
# File 'lib/jsx_rosetta/ir/types.rb', line 103 def name @name end |
#value ⇒ Object (readonly)
Returns the value of attribute value
103 104 105 |
# File 'lib/jsx_rosetta/ir/types.rb', line 103 def value @value end |