Class: Esbuild::BuildResult
- Inherits:
-
Object
- Object
- Esbuild::BuildResult
- Extended by:
- Forwardable
- Defined in:
- lib/esbuild/build_result.rb
Defined Under Namespace
Classes: Metafile, OutputFile
Instance Attribute Summary collapse
-
#metafile ⇒ Object
readonly
Returns the value of attribute metafile.
-
#output_files ⇒ Object
readonly
Returns the value of attribute output_files.
-
#warnings ⇒ Object
readonly
Returns the value of attribute warnings.
Instance Method Summary collapse
-
#initialize(response, state) ⇒ BuildResult
constructor
A new instance of BuildResult.
Constructor Details
#initialize(response, state) ⇒ BuildResult
Returns a new instance of BuildResult.
57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/esbuild/build_result.rb', line 57 def initialize(response, state) @state = state @warnings = response["warnings"] # TODO: symbolize keys if response["outputFiles"] @output_files = response["outputFiles"].map { |f| OutputFile.new(f["path"], f["contents"]) } end if response["metafile"] @metafile = Metafile.new(response["metafile"]) end end |
Instance Attribute Details
#metafile ⇒ Object (readonly)
Returns the value of attribute metafile.
54 55 56 |
# File 'lib/esbuild/build_result.rb', line 54 def @metafile end |
#output_files ⇒ Object (readonly)
Returns the value of attribute output_files.
53 54 55 |
# File 'lib/esbuild/build_result.rb', line 53 def output_files @output_files end |
#warnings ⇒ Object (readonly)
Returns the value of attribute warnings.
52 53 54 |
# File 'lib/esbuild/build_result.rb', line 52 def warnings @warnings end |