Class: Google::Apis::PagespeedonlineV5::AuditRefs

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/pagespeedonline_v5/classes.rb,
generated/google/apis/pagespeedonline_v5/representations.rb,
generated/google/apis/pagespeedonline_v5/representations.rb

Overview

A light reference to an audit by id, used to group and weight audits in a given category.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AuditRefs

Returns a new instance of AuditRefs.



45
46
47
# File 'generated/google/apis/pagespeedonline_v5/classes.rb', line 45

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#groupString

The category group that the audit belongs to (optional). Corresponds to the JSON property group

Returns:

  • (String)


33
34
35
# File 'generated/google/apis/pagespeedonline_v5/classes.rb', line 33

def group
  @group
end

#idString

The audit ref id. Corresponds to the JSON property id

Returns:

  • (String)


38
39
40
# File 'generated/google/apis/pagespeedonline_v5/classes.rb', line 38

def id
  @id
end

#weightFloat

The weight this audit's score has on the overall category score. Corresponds to the JSON property weight

Returns:

  • (Float)


43
44
45
# File 'generated/google/apis/pagespeedonline_v5/classes.rb', line 43

def weight
  @weight
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



50
51
52
53
54
# File 'generated/google/apis/pagespeedonline_v5/classes.rb', line 50

def update!(**args)
  @group = args[:group] if args.key?(:group)
  @id = args[:id] if args.key?(:id)
  @weight = args[:weight] if args.key?(:weight)
end