Class: JsxRosetta::IR::ServerDataSource

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

Overview

A Next.js server data-loading export (‘getServerSideProps` / `getStaticProps`). Captured at lowering time so the Phlex backend can surface the body as a TODO comment block pointed at the matching Rails controller action. Body is preserved verbatim — no JS-to-Ruby translation is attempted per project rules.

hook_name : String — “getServerSideProps” or “getStaticProps”. source : String — verbatim JS of the entire export statement.

Instance Attribute Summary collapse

Instance Attribute Details

#hook_nameObject (readonly)

Returns the value of attribute hook_name

Returns:

  • (Object)

    the current value of hook_name



115
116
117
# File 'lib/jsx_rosetta/ir/types.rb', line 115

def hook_name
  @hook_name
end

#sourceObject (readonly)

Returns the value of attribute source

Returns:

  • (Object)

    the current value of source



115
116
117
# File 'lib/jsx_rosetta/ir/types.rb', line 115

def source
  @source
end