Class: JsxRosetta::IR::StimulusMethod
- Inherits:
-
Data
- Object
- Data
- JsxRosetta::IR::StimulusMethod
- 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 (uniquified
when two handlers collide on the same base 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.
original_name : String — the requested base name before uniquification.
Equals `name` when there was no collision. When
`name != original_name`, backends emit a collision
marker comment in the generated controller JS so the
reviewer can see the silent rename.
Instance Attribute Summary collapse
-
#body_source ⇒ Object
readonly
Returns the value of attribute body_source.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#original_name ⇒ Object
readonly
Returns the value of attribute original_name.
Instance Attribute Details
#body_source ⇒ Object (readonly)
Returns the value of attribute body_source
282 283 284 |
# File 'lib/jsx_rosetta/ir/types.rb', line 282 def body_source @body_source end |
#name ⇒ Object (readonly)
Returns the value of attribute name
282 283 284 |
# File 'lib/jsx_rosetta/ir/types.rb', line 282 def name @name end |
#original_name ⇒ Object (readonly)
Returns the value of attribute original_name
282 283 284 |
# File 'lib/jsx_rosetta/ir/types.rb', line 282 def original_name @original_name end |