Class: Esbuild::BuildResult::Metafile

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

Defined Under Namespace

Classes: Input, Output

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ Metafile

Returns a new instance of Metafile.



45
46
47
48
49
# File 'lib/esbuild/build_result.rb', line 45

def initialize(json)
  hash = JSON.parse(json)
  @inputs = hash["inputs"].transform_values! { |v| Input.new(v) }
  @outputs = hash["outputs"].transform_values! { |v| Output.new(v) }
end

Instance Attribute Details

#inputsObject (readonly)

Returns the value of attribute inputs.



42
43
44
# File 'lib/esbuild/build_result.rb', line 42

def inputs
  @inputs
end

#outputsObject (readonly)

Returns the value of attribute outputs.



43
44
45
# File 'lib/esbuild/build_result.rb', line 43

def outputs
  @outputs
end