Class: JsxRosetta::IR::RenderMethod

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

Overview

A locally-declared JSX-returning arrow that’s invoked inside the render body: ‘const renderHeader = (count) => <h1>count</h1>; … renderHeader(headerCount)`. Backends emit one private method per RenderMethod on the generated class and reference it via a LocalRenderCall at each use site.

name : String — snake_case method name on the class. params : [String] — arrow param names (camelCase preserved; backends

snake_case to form Ruby parameter names).

body : Node — the lowered IR node produced by the arrow’s body.

Instance Attribute Summary collapse

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



393
394
395
# File 'lib/jsx_rosetta/ir/types.rb', line 393

def body
  @body
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



393
394
395
# File 'lib/jsx_rosetta/ir/types.rb', line 393

def name
  @name
end

#paramsObject (readonly)

Returns the value of attribute params

Returns:

  • (Object)

    the current value of params



393
394
395
# File 'lib/jsx_rosetta/ir/types.rb', line 393

def params
  @params
end