Class: JsxRosetta::IR::StimulusMethod

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

Overview

A handler method to be emitted on the generated Stimulus controller. Body translation is deferred to the human reviewer; we preserve the original JS body verbatim.

name : String — camelCase Stimulus method name. body_source : String — verbatim JS body (the entire arrow function or

the function expression body), preserved as a comment in
the emitted controller skeleton.

Instance Attribute Summary collapse

Instance Attribute Details

#body_sourceObject (readonly)

Returns the value of attribute body_source

Returns:

  • (Object)

    the current value of body_source



257
258
259
# File 'lib/jsx_rosetta/ir/types.rb', line 257

def body_source
  @body_source
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



257
258
259
# File 'lib/jsx_rosetta/ir/types.rb', line 257

def name
  @name
end