Class: JsxRosetta::IR::ConditionalSegment

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

Overview

A conditional class entry (‘{ “active”: isActive }` from cn-style helpers). Renders the class_name when the condition is truthy.

class_name : String — literal class string to emit when condition is truthy. condition : Interpolation — verbatim JS source of the condition.

Instance Attribute Summary collapse

Instance Attribute Details

#class_nameObject (readonly)

Returns the value of attribute class_name

Returns:

  • (Object)

    the current value of class_name



132
133
134
# File 'lib/jsx_rosetta/ir/types.rb', line 132

def class_name
  @class_name
end

#conditionObject (readonly)

Returns the value of attribute condition

Returns:

  • (Object)

    the current value of condition



132
133
134
# File 'lib/jsx_rosetta/ir/types.rb', line 132

def condition
  @condition
end