Class: Esbuild::TransformResult

Inherits:
Object
  • Object
show all
Defined in:
lib/esbuild/transform_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(result) ⇒ TransformResult

Returns a new instance of TransformResult.



5
6
7
8
9
# File 'lib/esbuild/transform_result.rb', line 5

def initialize(result)
  @code = read_file(result["codeFS"], result["code"])
  @map = read_file(result["mapFS"], result["map"])
  @warnings = result["warnings"]
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



3
4
5
# File 'lib/esbuild/transform_result.rb', line 3

def code
  @code
end

#mapObject (readonly)

Returns the value of attribute map.



3
4
5
# File 'lib/esbuild/transform_result.rb', line 3

def map
  @map
end

#warningsObject (readonly)

Returns the value of attribute warnings.



3
4
5
# File 'lib/esbuild/transform_result.rb', line 3

def warnings
  @warnings
end