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

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/pagespeedonline_v5/classes.rb,
lib/google/apis/pagespeedonline_v5/representations.rb,
lib/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.



55
56
57
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 55

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

Instance Attribute Details

#acronymString

The conventional acronym for the audit/metric. Corresponds to the JSON property acronym

Returns:

  • (String)


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

def acronym
  @acronym
end

#groupString

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

Returns:

  • (String)


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

def group
  @group
end

#idString

The audit ref id. Corresponds to the JSON property id

Returns:

  • (String)


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

def id
  @id
end

#relevant_auditsArray<String>

Any audit IDs closely relevant to this one. Corresponds to the JSON property relevantAudits

Returns:

  • (Array<String>)


48
49
50
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 48

def relevant_audits
  @relevant_audits
end

#weightFloat

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

Returns:

  • (Float)


53
54
55
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 53

def weight
  @weight
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



60
61
62
63
64
65
66
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 60

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