Class: JsxRosetta::IR::LocalBinding

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

Overview

A non-JSX local binding declared inside the component body (‘const date = parseISO(dateString)`). The verbatim source is preserved so the human reviewer can translate it.

name : String source : String — verbatim JS of the entire VariableDeclaration statement.

Instance Attribute Summary collapse

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



63
64
65
# File 'lib/jsx_rosetta/ir/types.rb', line 63

def name
  @name
end

#sourceObject (readonly)

Returns the value of attribute source

Returns:

  • (Object)

    the current value of source



63
64
65
# File 'lib/jsx_rosetta/ir/types.rb', line 63

def source
  @source
end