Class: JsxRosetta::IR::ClassList

Inherits:
Data
  • Object
show all
Includes:
Node
Defined in:
lib/jsx_rosetta/ir/types.rb

Overview

A decomposed className expression — the result of recognizing a ‘cn(…)` / `clsx(…)` / `classnames(…)` call at lowering time. Each segment is one of:

String                 — literal class chunk like "btn btn-primary"
Interpolation          — variable reference (translated by backend)
ConditionalSegment     — `{ "active": isActive }` style entry

Instance Attribute Summary collapse

Instance Attribute Details

#segmentsObject (readonly)

Returns the value of attribute segments

Returns:

  • (Object)

    the current value of segments



123
124
125
# File 'lib/jsx_rosetta/ir/types.rb', line 123

def segments
  @segments
end