Class: JsxRosetta::IR::Attribute

Inherits:
Data
  • Object
show all
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

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



103
104
105
# File 'lib/jsx_rosetta/ir/types.rb', line 103

def name
  @name
end

#valueObject (readonly)

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



103
104
105
# File 'lib/jsx_rosetta/ir/types.rb', line 103

def value
  @value
end