Class: Zui::TreeShaker::Report

Inherits:
Struct
  • Object
show all
Defined in:
lib/zui/tree_shaker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#after_bytesObject

Returns the value of attribute after_bytes

Returns:

  • (Object)

    the current value of after_bytes



32
33
34
# File 'lib/zui/tree_shaker.rb', line 32

def after_bytes
  @after_bytes
end

#before_bytesObject

Returns the value of attribute before_bytes

Returns:

  • (Object)

    the current value of before_bytes



32
33
34
# File 'lib/zui/tree_shaker.rb', line 32

def before_bytes
  @before_bytes
end

#componentsObject

Returns the value of attribute components

Returns:

  • (Object)

    the current value of components



32
33
34
# File 'lib/zui/tree_shaker.rb', line 32

def components
  @components
end

#qml_modulesObject

Returns the value of attribute qml_modules

Returns:

  • (Object)

    the current value of qml_modules



32
33
34
# File 'lib/zui/tree_shaker.rb', line 32

def qml_modules
  @qml_modules
end

#warningsObject

Returns the value of attribute warnings

Returns:

  • (Object)

    the current value of warnings



32
33
34
# File 'lib/zui/tree_shaker.rb', line 32

def warnings
  @warnings
end

Instance Method Details

#saved_bytesObject



34
# File 'lib/zui/tree_shaker.rb', line 34

def saved_bytes = before_bytes - after_bytes

#to_hObject



36
37
38
39
40
41
42
43
44
45
# File 'lib/zui/tree_shaker.rb', line 36

def to_h
  {
    "components" => components.map(&:to_s),
    "qml_modules" => qml_modules,
    "before_bytes" => before_bytes,
    "after_bytes" => after_bytes,
    "saved_bytes" => saved_bytes,
    "warnings" => warnings
  }
end